mirror of
https://github.com/acaloiaro/ess
synced 2026-07-21 18:29:08 +00:00
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: goreleaser
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Install Act dependencies
|
|
if: ${{ env.ACT }}
|
|
run: |
|
|
apt-get update && apt-get install curl git sudo xz-utils -y
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: install nix
|
|
uses: cachix/install-nix-action@v31
|
|
with:
|
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Setup go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}
|
|
- name: Bump version and push tag
|
|
run: |
|
|
nix develop --accept-flake-config --command bash -c 'prepare-release'
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v4
|
|
with:
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: release --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|