Skip to content

Commit 2b8ed06

Browse files
committed
fix version
1 parent 292a91d commit 2b8ed06

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,18 @@ jobs:
3535
process_version:
3636
runs-on: ubuntu-latest
3737
outputs:
38-
version: ${{ steps.version.outputs.version }}
38+
version: ${{ format('{0}{1}', steps.version_release.outputs.version, steps.version_snapshot.outputs.version) }}
3939
steps:
40-
- id: version
41-
name: Version
42-
run: |
43-
echo version="$(grep -q "SNAPSHOT" <<< "${{ inputs.version }}" && echo "${{ inputs.version }}" || echo "${{ inputs.version }}-SNAPSHOT")" >> "$GITHUB_OUTPUT"
40+
- id: version_snapshot
41+
if: ${{ inputs.snapshot }}
42+
name: Version
43+
run: |
44+
echo version="$(grep -q "SNAPSHOT" <<< "${{ inputs.version }}" && echo "${{ inputs.version }}" || echo "${{ inputs.version }}-SNAPSHOT")" >> "$GITHUB_OUTPUT"
45+
- id: version_release
46+
if: ${{ !inputs.snapshot }}
47+
name: Version
48+
run: |
49+
echo version="${{ inputs.version }}" >> "$GITHUB_OUTPUT"
4450
4551
version_seal:
4652
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)