mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 09:37:02 +00:00
* Switch from npm to yarn * Add minimum viable parcel dev server config * Remove webpack configs * Update docker build, build w/ yarn on node 16.x
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: Build and Release
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
tags: [ "v*" ]
|
|
pull_request:
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.17
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '16.x'
|
|
cache: 'yarn'
|
|
cache-dependency-path: ui/yarn.lock
|
|
- name: Build frontend
|
|
run: |
|
|
yarn install --frozen-lockfile --non-interactive
|
|
yarn run build
|
|
working-directory: ./ui
|
|
- name: Test build release
|
|
uses: goreleaser/goreleaser-action@v2
|
|
if: "!startsWith(github.ref, 'refs/tags/v')"
|
|
with:
|
|
version: latest
|
|
args: release --snapshot
|
|
- name: Build and publish release
|
|
uses: goreleaser/goreleaser-action@v2
|
|
if: "startsWith(github.ref, 'refs/tags/v')"
|
|
with:
|
|
version: latest
|
|
args: release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|