Skip to content

Commit

Permalink
ci: debug workflow extracting version
Browse files Browse the repository at this point in the history
Signed-off-by: deggja <[email protected]>
  • Loading branch information
deggja committed Oct 4, 2024
1 parent 7b70c03 commit f464bee
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/homebrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,25 @@ jobs:

- name: Extract release version
id: extract_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
run: |
if [ "${{ github.event_name }}" == "release" ]; then
TAG="${{ github.event.release.tag_name }}"
VERSION="${TAG#v}"
echo "Using release tag: $TAG"
elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
TAG="${{ github.event.inputs.tag }}"
VERSION="${TAG#v}"
echo "Using workflow_dispatch tag: $TAG"
else
echo "Unsupported event: $GITHUB_EVENT_NAME"
exit 1
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Print VERSION
run: echo "Version is $VERSION"

- name: Download macOS tarball
run: |
Expand Down

0 comments on commit f464bee

Please sign in to comment.