Skip to content

Commit

Permalink
👷 Set Release Version
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielePicco committed Feb 25, 2024
1 parent 8da8c0a commit 006b7f3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,16 @@ jobs:

- name: Set the release version
shell: bash
run: echo "RELEASE_VERSION=${github.event.inputs.release_version || GITHUB_REF:11}" >> $GITHUB_ENV
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "RELEASE_VERSION=${{ github.event.inputs.release_version }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "push" ]]; then
VERSION=$(echo "${GITHUB_REF}" | sed -E 's|refs/heads/release/v||')
echo "RELEASE_VERSION=${VERSION}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == "release" ]]; then
VERSION=$(echo "${GITHUB_REF}" | sed -E 's|refs/tags/v||')
echo "RELEASE_VERSION=${VERSION}" >> $GITHUB_ENV
fi
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
Expand Down

0 comments on commit 006b7f3

Please sign in to comment.