-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (42 loc) · 1.39 KB
/
package_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
name: Package and Documentation Release
on:
release:
types: [published]
jobs:
release-version:
runs-on: ubuntu-latest
steps:
- id: parse-version
name: Parse release version
run: |
echo "version=${RELEASE_VERSION/v/}" >> "$GITHUB_OUTPUT"
env:
RELEASE_VERSION: ${{ github.event.release.tag_name }}
outputs:
version: ${{ steps.parse-version.outputs.version }}
publish-test-pypi:
uses: ./.github/workflows/pypi.yml
with:
repository_url: https://test.pypi.org/legacy/
secrets:
API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
test-test-pypi:
needs: [release-version, publish-test-pypi]
uses: ./.github/workflows/tests.yml
with:
install_command: "python3 -m pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple gpu-tracker==${{ needs.release-version.outputs.version }}"
publish-pypi:
needs: test-test-pypi
uses: ./.github/workflows/pypi.yml
with:
repository_url: https://upload.pypi.org/legacy/
secrets:
API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
test-pypi:
needs: [release-version, publish-pypi]
uses: ./.github/workflows/tests.yml
with:
install_command: "python3 -m pip install gpu-tracker==${{ needs.release-version.outputs.version }}"
publish-documentation:
needs: test-pypi
uses: ./.github/workflows/documentation.yml