mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-24 11:14:23 +01:00
52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
name: release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- run: git fetch --force --tags
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ">=1.23.2"
|
|
cache: true
|
|
cache-dependency-path: go.sum
|
|
|
|
- run: go mod download
|
|
|
|
- name: Restore GoReleaser build cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.cache/go-build
|
|
dist/
|
|
.goreleaser.cache
|
|
key: ${{ runner.os }}-go-build-${{ hashFiles('**/*.go') }}-${{ hashFiles('go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-build-
|
|
|
|
- uses: goreleaser/goreleaser-action@v6
|
|
with:
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: release --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
|
|
AUR_KEY: ${{ secrets.AUR_KEY }}
|