diff --git a/.github/actions/package-and-upload-artifacts/action.yaml b/.github/actions/package-and-upload-artifacts/action.yaml index 82d4bad4..830578a5 100644 --- a/.github/actions/package-and-upload-artifacts/action.yaml +++ b/.github/actions/package-and-upload-artifacts/action.yaml @@ -1,5 +1,9 @@ name: Package and upload artifacts description: Package a Python project and upload the artifacts and release notes +inputs: + tag-name: + description: 'The name of the tag for the GitHub release' + required: true runs: using: 'composite' steps: @@ -22,7 +26,7 @@ runs: } changelog=$(cat "CHANGELOG.md") - target_version=${GITHUB_REF#refs/tags/} + target_version=${{ inputs.tag-name }} echo "TAG_NAME=$target_version" >> $GITHUB_ENV content=$(extract_version_content "$changelog" "$target_version") diff --git a/.github/workflows/version-preview.yaml b/.github/workflows/version-preview.yaml index c85ad0c8..02336a94 100644 --- a/.github/workflows/version-preview.yaml +++ b/.github/workflows/version-preview.yaml @@ -5,7 +5,7 @@ on: branches: [master] jobs: - bumpversion: + preview-version-hint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/version.yaml b/.github/workflows/version.yaml index b56f2231..cd68e25e 100644 --- a/.github/workflows/version.yaml +++ b/.github/workflows/version.yaml @@ -42,18 +42,25 @@ jobs: case "$RELEASE_KIND" in major|minor|patch) bump-my-version bump --allow-dirty --verbose "$RELEASE_KIND" - git push - git push --tags + echo "TAG_NAME=$(bump-my-version show current_version)" >> $GITHUB_ENV + # git push + # git push --tags echo "PACKAGE=true" >> $GITHUB_ENV ;; dev) - echo "Intentionally not bumping version for dev release" + echo "Temporary dev release for testing" + bump-my-version bump --allow-dirty --verbose "$RELEASE_KIND" + echo "TAG_NAME=$(bump-my-version show current_version)" >> $GITHUB_ENV + echo "PACKAGE=true" >> $GITHUB_ENV + # echo "Intentionally not bumping version for dev release" ;; esac - name: Package and upload artifacts if: ${{ env.PACKAGE == 'true' }} uses: ./.github/actions/package-and-upload-artifacts + with: + tag-name: ${{ env.TAG_NAME }} - name: Create a GitHub release if: ${{ env.PACKAGE == 'true' }}