2022-05-08 22:26:24 +03:00
|
|
|
name: Build LegendsBrowser
|
2022-05-08 22:24:33 +03:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
2022-05-10 20:47:51 +03:00
|
|
|
tags: [ '**' ]
|
2022-05-08 22:24:33 +03:00
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
2022-05-10 20:47:51 +03:00
|
|
|
workflow_dispatch:
|
2022-05-08 22:24:33 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v3
|
|
|
|
with:
|
|
|
|
go-version: 1.18
|
|
|
|
|
2022-05-10 20:47:51 +03:00
|
|
|
- name: Build
|
|
|
|
run: cd backend && go build -v ./...
|
2022-05-08 22:29:14 +03:00
|
|
|
|
2022-05-10 20:47:51 +03:00
|
|
|
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 }}
|