Update flake.lock and related CI dependencies #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: goreleaser | |
on: | |
push: | |
tags: | |
- 'v*' | |
pull_request: | |
paths: | |
- '.github/workflows/release.yml' | |
- '**.go' | |
- 'go.*' | |
- '.goreleaser.yaml' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pull-requests: write | |
checks: read # For private repositories | |
actions: read # For private repositories | |
jobs: | |
goreleaser: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
cache-dependency-path: 'go.sum' | |
- name: Wait other jobs | |
uses: kachick/wait-other-jobs@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
timeout-minutes: 30 | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
distribution: goreleaser | |
version: 'v1.21.2' # selfup { "regex": "\\d[^']+", "script": "goreleaser --version | grep 'GitVersion:' | tr -s ' ' | cut -d ' ' -f 2" } | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check the release step are valid or not in non tagged triggers | |
uses: goreleaser/goreleaser-action@v5 | |
# https://github.com/orgs/community/discussions/26386 | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
with: | |
distribution: goreleaser | |
version: 'v1.21.2' # selfup { "regex": "\\d[^']+", "script": "goreleaser --version | grep 'GitVersion:' | tr -s ' ' | cut -d ' ' -f 2" } | |
args: build --snapshot --clean | |
# https://github.com/goreleaser/goreleaser-action/tree/5fdedb94abba051217030cc86d4523cf3f02243d#upload-artifacts | |
- name: Upload assets | |
uses: actions/upload-artifact@v3 | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
with: | |
name: tools | |
path: dist/**/*.exe |