Skip to content

Commit

Permalink
try setting is-prerelease a different way
Browse files Browse the repository at this point in the history
  • Loading branch information
Confusingboat committed Mar 18, 2024
1 parent 4ac25d7 commit 6eb659e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
comment-identifier: 'TestResults'

tag:
if: ${{ github.event_name != 'pull_request' }}
if: ${{ github.event_name != 'pull_request' }}a
uses: ./.github/workflows/tag.yml

test-tag-output:
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
minor: ${{ steps.version.outputs.minor }}
patch: ${{ steps.version.outputs.patch }}
prerelease: ${{ steps.version.outputs.prerelease }}
prerelease-depth: ${{ steps.get-prerelease-depth.outputs.prerelease_depth }}
is-prerelease: ${{ contains(steps.version.outputs.prerelease, '-') }}
prerelease-depth: ${{ steps.set-prerelease-depth.outputs.prerelease_depth }}
is-prerelease: ${{ steps.set-is-prerelease.is_prerelease }}
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -58,13 +58,18 @@ jobs:
echo major: ${{ steps.version.outputs.major }}, minor: ${{ steps.version.outputs.minor }}, patch: ${{ steps.version.outputs.patch }}
echo prerelease: ${{ steps.version.outputs.prerelease }}
- name: Get prerelease depth
id: get-prerelease-depth
- name: Set prerelease depth
id: set-prerelease-depth
run: |
echo "prerelease_depth=$(echo '${{ steps.version.outputs.prerelease }}' | tr -cd '.' | wc -c | tr -d ' ')" >> "$GITHUB_OUTPUT"
- name: Echo prerelease depth
run: echo "${{ steps.get-prerelease-depth.outputs.prerelease_depth }}"
run: echo "${{ steps.set-prerelease-depth.outputs.prerelease_depth }}"

- name: Set is-prerelease
id: set-is-prerelease
run: |
echo "is_prerelease=${{ contains(steps.version.outputs.prerelease, '-') }}" >> "$GITHUB_OUTPUT"
- name: Tag version
if: ${{ github.ref == 'refs/heads/main' }}
Expand Down

0 comments on commit 6eb659e

Please sign in to comment.