memos/.github/workflows/build-artifacts.yml

46 lines
1.1 KiB
YAML
Raw Normal View History

2024-04-27 00:22:27 +08:00
name: Build artifacts
on:
push:
tags:
- "*"
permissions:
contents: write
jobs:
goreleaser:
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
check-latest: true
cache: true
2024-06-01 09:49:47 +08:00
- uses: pnpm/action-setup@v4.0.0
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: pnpm
cache-dependency-path: "web/pnpm-lock.yaml"
- run: pnpm install
working-directory: web
- run: pnpm release
working-directory: web
2024-04-27 00:22:27 +08:00
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
# 'latest', 'nightly', or a semver
version: latest
2024-06-01 10:04:39 +08:00
args: release --clean --skip-validate
2024-04-27 00:22:27 +08:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}