mirror of
https://github.com/tnb-labs/panel.git
synced 2026-09-17 16:39:01 +08:00
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: Release
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
permissions:
|
|
contents: write
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v7
|
|
with:
|
|
cache: true
|
|
go-version: 'stable'
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v6
|
|
with:
|
|
run_install: |
|
|
- cwd: web
|
|
package_json_file: web/package.json
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 24
|
|
cache: 'pnpm'
|
|
cache-dependency-path: web/pnpm-lock.yaml
|
|
- name: Build frontend
|
|
working-directory: web
|
|
run: |
|
|
cp .env.production .env
|
|
cp config/proxy-config.example.ts config/proxy-config.ts
|
|
pnpm run gettext:compile
|
|
pnpm build
|
|
- name: Set environment variables
|
|
run: |
|
|
echo "GOVERSION=$(go version | cut -d' ' -f3)" >> $GITHUB_ENV
|
|
echo "HOSTNAME=$(hostname)" >> $GITHUB_ENV
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v7
|
|
with:
|
|
version: latest
|
|
args: release --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|