Skip to content

Commit

Permalink
Add GitHub Actions for GoReleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed Aug 15, 2024
1 parent cd68036 commit 6ee1c15
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,25 @@ jobs:

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable

- name: Build
run: make

- name: Deploy - Create Release
- uses: goreleaser/goreleaser-action@v6
if: startsWith(github.ref, 'refs/tags/')
id: create_release
uses: actions/create-release@v1
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: ${{ github.ref_name }}
draft: false
prerelease: false

- name: Deploy - Upload Release
- name: Add additional GitHub Release assets
if: startsWith(github.ref, 'refs/tags/')
id: upload-release-asset
uses: csexton/release-asset-action@v2
uses: softprops/action-gh-release@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
release-url: ${{ steps.create_release.outputs.upload_url }}
pattern: ${{ env.NAME }}
files: |
etc/config.yml
etc/webhook-go.service

0 comments on commit 6ee1c15

Please sign in to comment.