Skip to content

Commit

Permalink
Use version output from update-version command
Browse files Browse the repository at this point in the history
  • Loading branch information
relativityhd committed Sep 30, 2024
1 parent 298f014 commit 528a7af
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions .github/workflows/update_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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

0 comments on commit 528a7af

Please sign in to comment.