release ci
This commit is contained in:
parent
a878578c9f
commit
7e9115dc64
36
.github/workflows/release.yaml
vendored
Normal file
36
.github/workflows/release.yaml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
releases-matrix:
|
||||||
|
name: Release Go Binary
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
# build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64
|
||||||
|
goos: [linux, windows, darwin]
|
||||||
|
goarch: ["386", amd64, arm64, "arm"]
|
||||||
|
exclude:
|
||||||
|
- goarch: "386"
|
||||||
|
goos: darwin
|
||||||
|
- goarch: arm
|
||||||
|
goos: windows
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: wangyoucao577/go-release-action@v1
|
||||||
|
with:
|
||||||
|
pre_command: bash build_frontend.sh
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
goos: ${{ matrix.goos }}
|
||||||
|
goarch: ${{ matrix.goarch }}
|
||||||
|
project_path: "./cmd/authlibskin"
|
||||||
|
binary_name: "authlibskin"
|
||||||
|
extra_files: LICENSE README.md
|
||||||
|
executable_compression: upx
|
||||||
|
build_flags: -tags="redis,sqlite"
|
||||||
|
ldflags: -w -s
|
6
build.sh
6
build.sh
@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd frontend
|
bash ./build_frontend.sh
|
||||||
npm install -g pnpm
|
|
||||||
pnpm install
|
|
||||||
pnpm build
|
|
||||||
cp -r dist ../server/static/files
|
|
||||||
|
|
||||||
cd ../cmd/authlibskin
|
cd ../cmd/authlibskin
|
||||||
go build -trimpath -ldflags "-w -s" -tags="redis,sqlite" -o out/authlibskin
|
go build -trimpath -ldflags "-w -s" -tags="redis,sqlite" -o out/authlibskin
|
||||||
|
6
build_frontend.sh
Normal file
6
build_frontend.sh
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
cd frontend
|
||||||
|
npm install -g pnpm
|
||||||
|
pnpm install
|
||||||
|
pnpm build
|
||||||
|
cp -r dist ../server/static/files
|
Loading…
x
Reference in New Issue
Block a user