Skip to content

Commit

Permalink
Fix: Apply version checking to release process (#394)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Watkins <[email protected]>
  • Loading branch information
ModeSevenIndustrialSolutions authored Sep 18, 2024
1 parent b055bb4 commit 8ebfaad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .github/actions/python-project-version-vs-tag/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@ runs:
export GITHUB_ENV="/dev/null"
fi
PROJECT_VERSION="${{ steps.fetch.outputs.version }}"
# Get version from pushed tag
TAG_VERSION="${{ github.ref_name }}"
echo "Version from tag push: $TAG_VERSION
echo "Version from tag push: $TAG_VERSION"
# Compare the two version strings
if [ "$TAG_VERSION" = "$PROJECT_VERSION" ]; then
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/github-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ jobs:
name: ${{ env.python_project_name }}-${{ inputs.build_tag }}
path: ${{ env.BUILD_ARTEFACTS }}

- name: "Check tag matches pyproject.toml"
# Enabled temporarily for testing
if: inputs.PRE_RELEASE == 'true'
# if: inputs.PRE_RELEASE == 'false'
- name: "Check project version matches pushed tags"
if: startsWith(github.ref, 'refs/tags/')
uses: os-climate/osc-github-devops/.github/actions/python-project-version-vs-tag@main

- name: "Create GitHub release"
Expand Down
Empty file added test.txt
Empty file.

0 comments on commit 8ebfaad

Please sign in to comment.