Merge pull request #21 from tiborhercz/vue3 #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GoReleaser | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
build-vue: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [ '20' ] | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-node@master | |
- name: Installing Vite | |
working-directory: ./static/UI | |
run: npm install -g vite | |
- name: Installing node project dependencies | |
working-directory: ./static/UI | |
run: npm install | |
- name: Building the project | |
working-directory: ./static/UI | |
run: npm run build | |
- name: Upload artifact for deployment jobs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vue-frontend | |
path: | | |
static/UI/dist/ | |
!static/UI/node_modules/ | |
build-wasm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: "1.20" | |
- name: Build wasm | |
run: GOOS=js GOARCH=wasm go build -o main.wasm wasm/*.go | |
- uses: actions/upload-artifact@master | |
with: | |
name: go-wasm | |
path: main.wasm | |
goreleaser: | |
needs: ['build-vue', 'build-wasm'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: Setup Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: "1.20.x" | |
- uses: actions/download-artifact@master | |
with: | |
name: vue-frontend | |
path: static/UI/dist | |
- uses: actions/download-artifact@master | |
with: | |
name: go-wasm | |
path: static/UI/dist | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v2 | |
with: | |
version: latest | |
args: release --skip-validate --rm-dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} |