mirror of
https://github.com/GwynethLlewelyn/goswi.git
synced 2026-08-14 00:58:00 +00:00
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
name: 'Automatically make a release with a new tag push'
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
# run only against tags
|
|
tags:
|
|
- "*"
|
|
workflow_dispatch:
|
|
|
|
# on:
|
|
# push:
|
|
# tags:
|
|
# - "v[0-9]+.[0-9]+.[0-9]+"
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
# issues: write
|
|
# id-token: write
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
|
|
#metadata:
|
|
# Set the modified timestamp on the metadata files.
|
|
#
|
|
# Templates: allowed.
|
|
# mod_timestamp: "{{ .CommitTimestamp }}"
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
- name: Unshallow
|
|
run: git fetch --prune --unshallow
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: stable
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v7
|
|
with:
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: release # --rm-dist
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
|
|