Skip to content

Commit

Permalink
Fix go releaser (#105)
Browse files Browse the repository at this point in the history
* Fix go releaser

* Fix go releaser
  • Loading branch information
goruha authored Jun 5, 2024
1 parent 6e25f05 commit 581635c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/shared-go-auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,27 @@ jobs:
run: |-
if [ -f .goreleaser.yml ]; then
echo 'Go releaser config exists.'
echo "path=./.goreleaser.yml" >> $GITHUB_OUTPUT
GORELEASER_CONFIG="./.goreleaser.yml"
else
echo 'Go releaser config does not exist. Use org wide config'
echo "path=../.configs/.github/goreleaser.yml" >> $GITHUB_OUTPUT
GORELEASER_CONFIG="../.configs/.github/goreleaser.yml"
fi
if [[ "${{ inputs.format }}" == "binary" ]]; then
sed -i 's/{{ .Env.ARCHIVES_FORMAT }}/binary/g' $GORELEASER_CONFIG
elif [[ "${{ inputs.format }}" == "zip" ]]; then
sed -i 's/{{ .Env.ARCHIVES_FORMAT }}/zip/g' $GORELEASER_CONFIG
fi
echo "path=./${$GORELEASER_CONFIG}" >> $GITHUB_OUTPUT
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
workdir: source
version: latest
args: release --config ${{ steps.go-releaser-config.outputs.path }} --clean --parallelism 2 --timeout 180m
env:
ARCHIVES_FORMAT: ${{ inputs.format }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ steps.github-app.outputs.token }}

Expand Down

0 comments on commit 581635c

Please sign in to comment.