Skip to content

chore(deps): bump actions/checkout from 5 to 6 #31

chore(deps): bump actions/checkout from 5 to 6

chore(deps): bump actions/checkout from 5 to 6 #31

Workflow file for this run

# This GitHub action can publish assets for release when a tag is created.
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
#
# This uses an action (paultyng/ghaction-import-gpg) that assumes you set your
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE`
# secret. If you would rather own your own GPG handling, please fork this action
# or use an alternative one for key handling.
#
# You will need to pass the `--batch` flag to `gpg` in your signing step
# in `goreleaser` to indicate this is being used in a non-interactive mode.
#
name: release
on:
pull_request:
push:
branches: [main, master, prod]
tags:
- "v*"
jobs:
linter:
name: Linter on a PR
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-24.04
steps:
- uses: Scalingo/actions/go-linter@main
tests:
name: Unit Tests
runs-on: ubuntu-24.04
steps:
- uses: Scalingo/actions/go-tests@main
goreleaser:
runs-on: ubuntu-24.04
needs: [linter, tests]
steps:
- name: Checkout
if: startsWith(github.ref, 'refs/tags/')
uses: actions/checkout@v6
- name: Unshallow
if: startsWith(github.ref, 'refs/tags/')
run: git fetch --prune --unshallow
- name: Set up Go
if: startsWith(github.ref, 'refs/tags/')
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
- name: Import GPG key
if: startsWith(github.ref, 'refs/tags/')
id: import_gpg
uses: Scalingo/ghaction-import-gpg@v1
env:
# These secrets will need to be configured for the repository:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
- name: Run GoReleaser
if: startsWith(github.ref, 'refs/tags/')
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --clean
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
# GitHub sets this automatically
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}