update action

This commit is contained in:
engigu
2024-01-01 20:55:09 +08:00
parent 00bc69bfef
commit 9d1c3004d5
+34 -33
View File
@@ -1,10 +1,11 @@
name: goreleaser name: goreleaser
on: on:
push: # push:
# run only against tags # # run only against tags
tags: # tags:
- '*' # - '*'
workflow_dispatch: #
permissions: permissions:
contents: write contents: write
@@ -20,41 +21,41 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Change directory to web project
run: cd web/
- name: Install npm dependencies - name: Install npm dependencies
run: npm i run: npm i
working-directory: web/
- name: Run npm build - name: Run npm build
run: npm run build run: npm run build
working-directory: web/
- name: Check build static - name: Check build static
run: ls -la run: ls -la
working-directory: web/
goreleaser: # goreleaser:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- uses: actions/checkout@v3 # - uses: actions/checkout@v3
with: # with:
fetch-depth: 0 # fetch-depth: 0
- run: git fetch --force --tags # - run: git fetch --force --tags
- uses: actions/setup-go@v3 # - uses: actions/setup-go@v3
with: # with:
go-version: '>=1.20.2' # go-version: '>=1.20.2'
cache: true # cache: true
# More assembly might be required: Docker logins, GPG, etc. It all depends # # More assembly might be required: Docker logins, GPG, etc. It all depends
# on your needs. # # on your needs.
- uses: goreleaser/goreleaser-action@v4 # - uses: goreleaser/goreleaser-action@v4
with: # with:
# either 'goreleaser' (default) or 'goreleaser-pro': # # either 'goreleaser' (default) or 'goreleaser-pro':
distribution: goreleaser # distribution: goreleaser
version: latest # version: latest
args: release --clean # args: release --clean
env: # env:
GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }} # GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' # # Your GoReleaser Pro key, if you are using the 'goreleaser-pro'
# distribution: # # distribution:
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} # # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
#
#