teldrive/.github/workflows/release.yml

50 lines
1.2 KiB
YAML
Raw Normal View History

2023-08-16 20:48:32 +08:00
name: Goreleaser
on:
push:
tags:
2024-02-09 01:31:13 +08:00
- "[0-9].[0-9]+.[0-9]+"
2023-08-16 20:48:32 +08:00
2024-02-09 01:31:13 +08:00
permissions: write-all
2023-08-16 20:48:32 +08:00
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
2023-08-21 06:25:01 +08:00
- name: Checkout
2023-08-16 20:48:32 +08:00
uses: actions/checkout@v3
with:
fetch-depth: 0
2023-09-08 19:06:59 +08:00
submodules: true
2024-02-09 01:31:13 +08:00
2023-08-21 06:25:01 +08:00
- name: Set up Go
2023-08-21 06:42:29 +08:00
uses: actions/setup-go@v4
2023-08-16 20:48:32 +08:00
with:
2024-02-09 00:16:34 +08:00
go-version: stable
2024-02-09 01:31:13 +08:00
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
2024-02-09 21:12:13 +08:00
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
2023-12-22 19:01:36 +08:00
2024-02-09 21:12:13 +08:00
- name: Set env
run: |
echo "GORELEASER_PREVIOUS_TAG=$(git tag --sort=committerdate | grep -E '[0-9]+\.[0-9]+\.[0-9]+$' | tail -2 | head -1)" >> $GITHUB_ENV
2023-08-21 06:25:01 +08:00
- name: Run GoReleaser
2024-02-09 00:16:34 +08:00
uses: goreleaser/goreleaser-action@v5
2023-08-16 20:48:32 +08:00
with:
distribution: goreleaser
version: latest
2023-08-21 06:42:29 +08:00
args: release --clean
2023-08-16 20:48:32 +08:00
env:
2024-02-09 01:31:13 +08:00
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}