mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 21:09:11 +00:00
46 lines
913 B
YAML
46 lines
913 B
YAML
name: "Release Binary"
|
|
|
|
# Pairs with .goreleaser.yaml file for configuration.
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags:
|
|
- v*
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
goreleaser:
|
|
permissions: write-all
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.22"
|
|
|
|
- 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:
|
|
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
|