Skip to content

Commit

Permalink
github release fix
Browse files Browse the repository at this point in the history
  • Loading branch information
oke11o committed Jan 15, 2024
1 parent 418ccbf commit bf8e7b3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release

on:
release:
types: [created]
types: [ created ]

permissions:
contents: write
Expand All @@ -14,8 +14,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
arch: [amd64]
os: [ ubuntu-latest, macOS-latest ]
arch: [ amd64 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
Expand All @@ -32,6 +32,8 @@ jobs:

- name: Set GITHUB_ENV
run: |
stripped_tag="${{ github.event.release.tag_name }}"
echo "STRIPPED_TAG=${stripped_tag:1}" >> "$GITHUB_ENV"
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
echo "GOOS=linux" >> $GITHUB_ENV
else
Expand All @@ -42,9 +44,9 @@ jobs:
run: |
export GOARCH=${{ matrix.arch }}
export CGO_ENABLED=0
go build -o pandora_${{ github.event.release.tag_name }}_${GOOS}_${{ matrix.arch }}
go build -o pandora_${STRIPPED_TAG}_${GOOS}_${{ matrix.arch }}
- name: Release
uses: softprops/action-gh-release@v1
with:
files: pandora_${{ github.event.release.tag_name }}_${{ env.GOOS }}_${{ matrix.arch }}
files: pandora_${{ env.STRIPPED_TAG }}_${{ env.GOOS }}_${{ matrix.arch }}

0 comments on commit bf8e7b3

Please sign in to comment.