Skip to content

Commit

Permalink
test: Check new version then release
Browse files Browse the repository at this point in the history
  • Loading branch information
navasvarela committed Sep 18, 2024
1 parent 313f408 commit 866a9e4
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 866a9e4

Please sign in to comment.