Skip to content

Commit

Permalink
Fixed create_release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilInTheGaps committed Nov 11, 2023
1 parent 52c717c commit c878de3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Create Release
on:
push:
tags: ['*']
branches:
- master
release:
types: [published]
pull_request:
Expand All @@ -31,7 +29,7 @@ jobs:
tag_or_branch="${GM_GITHUB_REF#refs/tags/}"
tag_or_branch="${tag_or_branch#refs/heads/}"
echo "GM_RELEASE_NAME=gm-companion_$tag_or_branch" >> "$GITHUB_ENV"
echo "GM_RELEASE_FILE=companion_$tag_or_branch.tar.gz" >> "$GITHUB_ENV"
echo "GM_RELEASE_FILE=gm-companion_$tag_or_branch.tar.gz" >> "$GITHUB_ENV"
- name: Create source distribution
run: |
# Create new folder with specified name so extracting the archive yields that
Expand All @@ -45,7 +43,7 @@ jobs:
tar -czf "$GM_RELEASE_FILE" "$GM_RELEASE_NAME"
echo "Created source archive $GM_RELEASE_FILE with content: $(ls -a "$GM_RELEASE_NAME")"
- name: Upload source distribution
if: ${{ github.event_name == 'release' }}
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: ${{env.GM_RELEASE_FILE}}
Expand Down

0 comments on commit c878de3

Please sign in to comment.