Skip to content

https://github.com/actions/upload-artifact #11

https://github.com/actions/upload-artifact

https://github.com/actions/upload-artifact #11

name: goreleaser-actions
#https://github.com/goreleaser/goreleaser-action
#https://goreleaser.com/customization/builds/ 文档
on:
pull_request:
push:
branches:
- dev
permissions:
contents: read #write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v4
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
# 'latest', 'nightly', or a semver
version: latest
args: release --snapshot --clean #--snapshot是不正式版本,取消git tag校验
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: Upload assets
uses: actions/upload-artifact@v4
#https://github.com/actions/upload-artifact
with:
name: MyApps
# path: ./dist/* #全部文件一股脑打包,太臃肿
path: |
./dist/*.tar.gz
./dist/*.zip
./dist/simple_file_download_server[\w\.\-\_]+_checksums.txt