dorfylegends/.github/workflows/build.yml
2023-11-17 15:37:02 +00:00

45 lines
883 B
YAML

name: Build LegendsBrowser
on:
push:
branches: [ master ]
tags: [ '**' ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21
- name: Build
run: cd backend && go build -v ./...
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.21
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
workdir: backend
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}