Skip to content

👷 Refactor docker build and update actions #17

👷 Refactor docker build and update actions

👷 Refactor docker build and update actions #17

Workflow file for this run

name: Go releaser
on:
workflow_dispatch:
push:
tags:
- "v*"
permissions: read-all
jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Test
uses: eat-pray-ai/yutu/.github/actions/test@main
- name: Run goreleaser
uses: goreleaser/goreleaser-action@v6
env:
GITHUB_TOKEN: ${{ github.token }}
with:
distribution: goreleaser
args: release --clean
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: binary
path: dist/yutu_*/yutu-*
attestation:
needs: [goreleaser]
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
attestations: write
strategy:
fail-fast: false
matrix:
path:
- darwin_amd64_v1/yutu-darwin-amd64
- darwin_arm64_v8.0/yutu-darwin-arm64
- linux_amd64_v1/yutu-linux-amd64
- linux_arm64_v8.0/yutu-linux-arm64
- windows_amd64_v1/yutu-windows-amd64.exe
- windows_arm64_v8.0/yutu-windows-arm64.exe
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: binary
- name: Attest
uses: actions/attest-build-provenance@v2
with:
subject-path: '${{ github.workspace }}/yutu_${{ matrix.path }}'
winget:
needs: [goreleaser]
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: vedantmgoyal9/winget-releaser@main
with:
identifier: eat-pray-ai.yutu
installers-regex: '\.exe$' # Only .exe files
token: ${{ secrets.RELEASE_PAT }}
max-versions-to-keep: 3
homebrew:
needs: [goreleaser]
runs-on: macos-latest
if: false
steps:
- uses: dawidd6/action-homebrew-bump-formula@v4
with:
token: ${{ secrets.RELEASE_PAT }}
tag: ${{ github.event.release.tag_name }}
org: eat-pray-ai
formula: yutu
github-package:
needs: [goreleaser]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- uses: eat-pray-ai/yutu/.github/actions/github-packages@main