From 528a7afc6b7095038e6d8046851cd32314808645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6lzer?= Date: Mon, 30 Sep 2024 02:43:04 +0200 Subject: [PATCH] Use version output from update-version command --- .github/workflows/update_version.yml | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/.github/workflows/update_version.yml b/.github/workflows/update_version.yml index ddecb02..d5bdd05 100644 --- a/.github/workflows/update_version.yml +++ b/.github/workflows/update_version.yml @@ -33,6 +33,9 @@ jobs: update-version: runs-on: ubuntu-latest + outputs: + VERSION: ${{ steps.get_version.outputs.VERSION }} + steps: - name: Checkout repository uses: actions/checkout@v2 @@ -107,11 +110,6 @@ jobs: # TODO: Run tests - # Get the new version with rye version and save it as an variable - - name: Get new version - id: get_version - run: echo "VERSION=$(rye version)" >> $GITHUB_OUTPUT - # - name: Publish to PyPI # run: | # if [ ${{ github.event.inputs.package }} == 'all' ]; then @@ -131,8 +129,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: v${{ steps.get_version.outputs.VERSION }} - release_name: Release ${{ steps.get_version.outputs.VERSION }} + tag_name: v${{ needs.update-version.outputs.VERSION }} + release_name: Release ${{ needs.update-version.outputs.VERSION }} draft: false prerelease: false @@ -152,11 +150,10 @@ jobs: git config user.name github-actions[bot] git config user.email 41898282+github-actions[bot]@users.noreply.github.com - - name: Install rye - uses: eifinger/setup-rye@v4 + - name: Setup Python + uses: actions/setup-python@v5 with: - enable-cache: true - version: '0.39.0' + python-version: '3.11' - name: Get cache id run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV @@ -173,10 +170,5 @@ jobs: run: | pip install "mkdocs-material[imaging]>=9.5.38" "mkdocstrings[python]>=0.26.1" "mike>=2.1.3" "mkdocs-git-revision-date-localized-plugin>=1.2.9" "mkdocs-git-committers-plugin-2>=2.3.0" - # Get the new version with rye version and save it as an variable - - name: Get new version - id: get_version - run: echo "VERSION=$(rye version)" >> $GITHUB_OUTPUT - - name: Publish documentation - run: mike deploy --push --update-aliases ${{ steps.get_version.outputs.VERSION }} latest + run: mike deploy --push --update-aliases ${{ needs.update-version.outputs.VERSION }} latest