sonr/.github/workflows/run-goreleaser.yml

46 lines
917 B
YAML
Raw Normal View History

2024-07-05 22:20:13 -04:00
name: "Release Binary"
# Pairs with .goreleaser.yaml file for configuration.
on:
push:
2024-09-14 14:27:45 -04:00
branches:
- master
2024-07-05 22:20:13 -04:00
tags:
2024-09-14 14:27:45 -04:00
- v*
2024-07-05 22:20:13 -04:00
2024-09-14 14:27:45 -04:00
permissions:
contents: write
2024-07-05 22:20:13 -04:00
jobs:
goreleaser:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
2024-09-14 14:27:45 -04:00
- uses: actions/setup-go@v3
2024-07-05 22:20:13 -04:00
with:
2024-09-14 14:27:45 -04:00
go-version: "1.21"
2024-07-05 22:20:13 -04:00
- name: Clean up dist directory
run: rm -rf dist
- name: Build
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: build --skip-validate
- name: Release
uses: goreleaser/goreleaser-action@v5
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --skip-validate --clean
env:
2024-09-14 14:27:45 -04:00
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}