goreleaser
This commit is contained in:
parent
2a02b4606d
commit
202ff3df6d
|
@ -21,4 +21,5 @@ USER vscode
|
|||
# RUN npm install -g @angular/CLI
|
||||
# [Optional] Uncomment this line to install global node packages.
|
||||
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|
||||
RUN go install github.com/tc-hib/go-winres@latest
|
||||
RUN go install github.com/tc-hib/go-winres@latest \
|
||||
&& go install github.com/goreleaser/goreleaser@latest
|
|
@ -3,8 +3,10 @@ name: Build LegendsBrowser
|
|||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
tags: [ '**' ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
|
@ -18,26 +20,26 @@ jobs:
|
|||
with:
|
||||
go-version: 1.18
|
||||
|
||||
- name: Build MacOS
|
||||
run: cd backend && GOOS=darwin GOARCH=amd64 go build -o ../bin/legendsbrowser-mac-intel
|
||||
- name: Build Linux
|
||||
run: cd backend && GOOS=linux GOARCH=amd64 go build -o ../bin/legendsbrowser-linux-x64
|
||||
- name: Build Windows
|
||||
run: cd backend && GOOS=windows GOARCH=amd64 go build -o ../bin/legendsbrowser-win-x64.exe
|
||||
- name: Build
|
||||
run: cd backend && go build -v ./...
|
||||
|
||||
- name: Upload MacOS Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: mac-os
|
||||
path: bin/legendsbrowser-mac-intel
|
||||
- name: Upload Linux Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux
|
||||
path: bin/legendsbrowser-linux-x64
|
||||
- name: Upload MacOS Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: windows
|
||||
path: bin/legendsbrowser-win-x64.exe
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build ]
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.18
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
version: latest
|
||||
workdir: backend
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -3,3 +3,4 @@ same.json
|
|||
conf.json
|
||||
_conf.json
|
||||
/*.png
|
||||
dist/
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
builds:
|
||||
- binary: legendsbrowser
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- linux
|
||||
- windows
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
archives:
|
||||
- format: zip
|
||||
name_template: "legendsbrowser-{{ .Version }}-{{ .Os }}"
|
||||
replacements:
|
||||
darwin: macos
|
||||
linux: linux
|
||||
windows: win
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
Loading…
Reference in New Issue