Skip to content

Package and Documentation Release #19

Package and Documentation Release

Package and Documentation Release #19

Workflow file for this run

name: Release the Next Version of the Package and Documentation
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:
needs: release-version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install build
- name: Build package
run: |
echo "Building package of version ${RELEASE_VERSION}"
python3 -m build
- name: Publish package to Test-PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
env:
RELEASE_VERSION: ${{ needs.release-version.outputs.version }}
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 }}"
# - name: Publish package to PyPi
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.PYPI_API_TOKEN }}