add go releaser
This commit is contained in:
2
.github/workflows/docker-next-terminal.yml
vendored
2
.github/workflows/docker-next-terminal.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
|||||||
- name: node Setup
|
- name: node Setup
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '16'
|
||||||
- name: npm install
|
- name: npm install
|
||||||
run: |
|
run: |
|
||||||
cd web
|
cd web
|
||||||
|
29
.github/workflows/goreleaser.yml
vendored
Normal file
29
.github/workflows/goreleaser.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: node Setup
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '16'
|
||||||
|
- name: npm install
|
||||||
|
run: |
|
||||||
|
cd web
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Run GoReleaser
|
||||||
|
uses: goreleaser/goreleaser-action@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.17
|
||||||
|
version: latest
|
||||||
|
args: release --rm-dist
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
30
.goreleaser.yml
Normal file
30
.goreleaser.yml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
builds:
|
||||||
|
- env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
- windows
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- arm
|
||||||
|
- arm64
|
||||||
|
- 386
|
||||||
|
- amd64
|
||||||
|
- mips
|
||||||
|
- mipsle
|
||||||
|
checksum:
|
||||||
|
name_template: "checksums.txt"
|
||||||
|
|
||||||
|
release:
|
||||||
|
# Same as for github
|
||||||
|
# Note: it can only be one: either github, gitlab or gitea
|
||||||
|
github:
|
||||||
|
owner: dushixiang
|
||||||
|
name: next-terminal
|
||||||
|
|
||||||
|
# You can add extra pre-existing files to the release.
|
||||||
|
# The filename on the release will be the last part of the path (base). If
|
||||||
|
# another file with the same name exists, the latest one found will be used.
|
||||||
|
# Defaults to empty.
|
||||||
|
extra_files:
|
||||||
|
- glob: ./web/build/*
|
7
build.sh
7
build.sh
@ -1,7 +0,0 @@
|
|||||||
#cd web
|
|
||||||
#npm run build
|
|
||||||
#rm -rf ../bin/web/build
|
|
||||||
#mkdir -p ../bin/web/build
|
|
||||||
#cp -r build ../bin/web/
|
|
||||||
#cd ..
|
|
||||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -o bin/next-terminal main.go
|
|
Reference in New Issue
Block a user