Skip to content

Commit

Permalink
Merge pull request #6 from NillionNetwork/test/versioncheck
Browse files Browse the repository at this point in the history
test: Check new version then release
  • Loading branch information
navasvarela authored Sep 18, 2024
2 parents 792c122 + 866a9e4 commit 1d6cd3f
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,34 @@ permissions:
contents: read

jobs:
build:
checkversion:
runs-on: ubuntu-latest
outputs:
local_version_is_higher: ${{ steps.versioncheck.outputs.local_version_is_higher }}
local_version: ${{ steps.versioncheck.outputs.local_version }}
remote_version: ${{ steps.versioncheck.outputs.public_version }}
steps:
- uses: actions/checkout@v3

- name: Check pypi versions
uses: maybe-hello-world/pyproject-check-version@v4
id: versioncheck
with:
pyproject-path: "./pyproject.toml" # default value
pyproject-path: "./pyproject.toml" # default value

- name: check output
run: |
echo "Output: ${{ steps.versioncheck.outputs.local_version_is_higher }}" # 'true' or 'false
echo "Local version: ${{ steps.versioncheck.outputs.local_version }}" # e.g., 0.1.1
echo "Public version: ${{ steps.versioncheck.outputs.public_version }}" # e.g., 0.1.0
echo "Output: ${{ steps.versioncheck.outputs.local_version_is_higher }}" # 'true' or 'false
echo "Local version: ${{ steps.versioncheck.outputs.local_version }}" # e.g., 0.1.1
echo "Public version: ${{ steps.versioncheck.outputs.public_version }}" # e.g., 0.1.0
github-release:
if: needs.checkversion.outputs.local_version_is_higher == 'true'
runs-on: ubuntu-latest
steps:
- name: Print release message
run: |
echo "Creating release: ${{ needs.checkversion.outputs.local_version }}"
# steps:
# - uses: actions/checkout@v4
Expand Down

0 comments on commit 1d6cd3f

Please sign in to comment.