Skip to content

Commit

Permalink
fix(ci): release step
Browse files Browse the repository at this point in the history
  • Loading branch information
kvendingoldo committed Feb 9, 2025
1 parent c351f7a commit 9104c02
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,23 @@ jobs:
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_TOKEN }}

- name: Prepare extra command for goreleaser
id: prepare_goreleaser_extra_commands
- name: Prepare goreleaser file
run: |
set -x
EXTRA_GORELEASER_COMMANDS=""
TAG=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
if [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
EXTRA_GORELEASER_COMMANDS="-f .goreleaser_release_only.yml ${EXTRA_GORELEASER_COMMANDS}"
yq eval-all '. as $item ireduce ({}; . * $item)' .goreleaser.yml .goreleaser_release_only.yml > .goreleaser_ci.yml
else
cp .goreleaser.yml .goreleaser_ci.yml
fi
echo "EXTRA_GORELEASER_COMMANDS=${EXTRA_GORELEASER_COMMANDS}" >> $GITHUB_OUTPUT
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: "~> v2"
args: release --clean -f ${{ vars.GORELEASER_CONFIG_PATH }} ${{ steps.prepare_goreleaser_extra_commands.outputs.EXTRA_GORELEASER_COMMANDS }}
args: release --clean -f .goreleaser_ci.yml
env:
AUR_KEY: ${{ secrets.AUR_KEY }}
DISABLE_CHANGELOG: ${{ vars.DISABLE_CHANGELOG}}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ atmos

# File for changelog process
release-notes.txt

# CI files
.goreleaser_ci.yml

0 comments on commit 9104c02

Please sign in to comment.