Skip to content

Commit

Permalink
fix: goreleaser config
Browse files Browse the repository at this point in the history
  • Loading branch information
kvendingoldo committed Dec 27, 2024
1 parent e2316b3 commit 8cd0dcc
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 18 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,25 @@ jobs:
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_TOKEN }}

- name: Prepare extra command for goreleaser
id: prepare_goreleaser_extra_commands
run: |
set -x
EXTRA_GORELEASER_COMMANDS=""
TAG=${{ github.ref | replace('refs/tags/', '') }}
if [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
EXTRA_GORELEASER_COMMANDS="-f .goreleaser_announce.yml ${EXTRA_GORELEASER_COMMANDS}"
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 }}
args: release --clean -f ${{ vars.GORELEASER_CONFIG_PATH }} ${{ steps.prepare_goreleaser_extra_commands.outputs.EXTRA_GORELEASER_COMMANDS }}
env:
AUR_KEY: ${{ secrets.AUR_KEY }}
GITHUB_TOKEN: ${{ secrets.TENV_GITHUB_TOKEN }}
Expand Down
17 changes: 0 additions & 17 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
project_name: tenv
version: 2

announce:
slack:
enabled: true
message_template: ":tada: tenv {{.Tag}} is available! See what's new here - https://github.com/tofuutils/tenv/releases/tag/{{.Tag}}"
channel: "#tofuutils"
username: "tofuutils-notifications"
icon_emoji: ""
icon_url: ""
blocks: []
attachments: []

telegram:
enabled: true
chat_id: -4020097127
message_template: "🎉 tenv {{.Tag}} is available! See what's new here - https://github.com/tofuutils/tenv/releases/tag/{{.Tag}}"
parse_mode: HTML

before:
hooks:
- go mod tidy
Expand Down
16 changes: 16 additions & 0 deletions .goreleaser_announce.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
announce:
slack:
enabled: true
message_template: ":tada: tenv {{.Tag}} is available! See what's new here - https://github.com/tofuutils/tenv/releases/tag/{{.Tag}}"
channel: "#tofuutils"
username: "tofuutils-notifications"
icon_emoji: ""
icon_url: ""
blocks: []
attachments: []

telegram:
enabled: true
chat_id: -4020097127
message_template: "🎉 tenv {{ mdv2escape .Tag}} is available{{ mdv2escape '!' }} See what is new here - https://github.com/tofuutils/tenv/releases/tag/{{ mdv2escape .Tag}}"
parse_mode: HTML

0 comments on commit 8cd0dcc

Please sign in to comment.