1
0
mirror of https://github.com/stryan/mumble-discord-bridge.git synced 2024-11-23 05:45:41 -05:00
mumble-discord-bridge/.github/workflows/build-release.yml
2021-12-15 01:11:31 -05:00

54 lines
1.3 KiB
YAML

name: 'CI'
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install libopus-dev zip
run: sudo apt update && sudo apt-get -y install libopus-dev zip
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: go-license install
run: go install github.com/google/go-licenses@latest
- name: go-license save
run: go-licenses save ./cmd/mumble-discord-bridge --force --save_path="./LICENSES" && zip -r -9 LICENSES.zip ./LICENSES
- name: Run GoReleaser Build
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: build --rm-dist --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser Release
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload assets
uses: actions/upload-artifact@v2
with:
name: mdb
path: dist/*