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:
|
2023-11-17 17:20:29 +02:00
|
|
|
go-version: 1.21
|
2022-05-08 22:24:33 +03:00
|
|
|
|
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:
|
2023-11-17 17:20:29 +02:00
|
|
|
go-version: 1.21
|
2022-05-10 20:47:51 +03:00
|
|
|
|
|
|
|
- name: Run GoReleaser
|
|
|
|
uses: goreleaser/goreleaser-action@v2
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
workdir: backend
|
2023-11-17 17:20:29 +02:00
|
|
|
args: release --clean
|
2022-05-10 20:47:51 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|