Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix go releaser #105

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading