Skip to content

Commit

Permalink
Add GitHub Actions Workflow to easily release.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcouture committed Oct 10, 2023
1 parent f25778c commit a64da17
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
workflow_dispatch:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags

- uses: actions/setup-go@v4
with:
go-version-file: "**/go.mod"
cache: true

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: goreleaser/goreleaser-action@v5
if: success() && startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}

0 comments on commit a64da17

Please sign in to comment.