61 lines
1.3 KiB
YAML
61 lines
1.3 KiB
YAML
name: goreleaser
|
|
|
|
on:
|
|
push:
|
|
# run only against tags
|
|
tags:
|
|
- '*'
|
|
|
|
permissions:
|
|
contents: write
|
|
# packages: write
|
|
# issues: write
|
|
|
|
jobs:
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Change directory to web project
|
|
run: cd web/
|
|
|
|
- name: Install npm dependencies
|
|
run: npm i
|
|
|
|
- name: Run npm build
|
|
run: npm run build
|
|
|
|
- name: Check build static
|
|
run: ls -la
|
|
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- run: git fetch --force --tags
|
|
- uses: actions/setup-go@v3
|
|
with:
|
|
go-version: '>=1.20.2'
|
|
cache: true
|
|
# More assembly might be required: Docker logins, GPG, etc. It all depends
|
|
# on your needs.
|
|
- uses: goreleaser/goreleaser-action@v4
|
|
with:
|
|
# either 'goreleaser' (default) or 'goreleaser-pro':
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: release --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
|
|
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro'
|
|
# distribution:
|
|
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
|
|
|
|