-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (71 loc) · 1.87 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: release
on:
release:
types:
- created
env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
jobs:
package-goe:
name: Package GOE artefacts required for installation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Fetch all tags
fetch-depth: 0
- name: Set up JDK & SBT
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install base libraries
run: pip install --quiet --upgrade pip build setuptools wheel
- name: Building GOE package
run: make package
- name: Move package to `dist/`
run: mv goe_*.tar.gz dist/goe.tar.gz
- uses: actions/upload-artifact@v4
with:
name: artifacts
path: dist/goe.tar.gz
if-no-files-found: error
publish:
name: Publish release
needs:
- package-goe
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: artifacts
path: dist
- name: Add package to current release
uses: softprops/action-gh-release@v2
with:
files: dist/goe.tar.gz
pypi-publish:
name: Publish release to PyPI
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip install --quiet --upgrade pip build setuptools wheel
- name: Build package
run: |
python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1