Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmacdonald committed Nov 18, 2023
1 parent 5c1f5a5 commit 6ce9932
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 28 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,10 @@ jobs:
with:
fetch-depth: 0

- run: git fetch --force --tags

- uses: actions/setup-go@v4
with:
go-version: 'stable'

- run: go mod tidy

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -130,23 +126,23 @@ jobs:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}

- uses: goreleaser/goreleaser-action@v5
if: success() && startsWith(github.ref, 'refs/tags/v')
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }}
DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

- name: Build & publish image
run: |
docker build . --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${GITHUB_REF##*/}
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${GITHUB_REF##*/}
# - uses: goreleaser/goreleaser-action@v5
# if: success() && startsWith(github.ref, 'refs/tags/v')
# with:
# distribution: goreleaser
# version: latest
# args: release --clean
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# DISCORD_WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }}
# DISCORD_WEBHOOK_TOKEN: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
# GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

- name: Upload snapshot
if: success() && ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v3
Expand Down
27 changes: 15 additions & 12 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,22 @@ signs:
- "--detach-sign"
- "${artifact}"

announce:
discord:
enabled: true
message_template: 'gbans {{.Tag}} is out!'
sboms:
- artifacts: archive

# Set author of the embed.
# Defaults to `GoReleaser`
author: 'Leigh MacDonald'
# color: ''

# URL to an image to use as the icon for the embed.
# Defaults to `https://goreleaser.com/static/avatar.png`
# icon_url: ''
#announce:
# discord:
# enabled: true
# message_template: 'gbans {{.Tag}} is out!'
#
# # Set author of the embed.
# # Defaults to `GoReleaser`
# author: 'Leigh MacDonald'
# # color: ''
#
# # URL to an image to use as the icon for the embed.
# # Defaults to `https://goreleaser.com/static/avatar.png`
# # icon_url: ''

# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

0 comments on commit 6ce9932

Please sign in to comment.