fix: 修正二进制路径 #345
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
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
name: Create Release And Upload assets | |
jobs: | |
create-release: | |
name: Create Release | |
runs-on: ubuntu-latest | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
/usr/local/share/.cache/yarn | |
key: ${{ runner.os }}-koko | |
restore-keys: ${{ runner.os }}-koko | |
- name: Get version | |
run: | | |
TAG=$(basename ${GITHUB_REF}) | |
echo "TAG=$TAG" >> $GITHUB_ENV | |
- name: Create Release | |
id: create_release | |
uses: release-drafter/release-drafter@v6 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
config-name: release-config.yml | |
version: ${{ env.TAG }} | |
tag: ${{ env.TAG }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20.15' | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' # The Go version to download (if necessary) and use. | |
- name: Make Build | |
id: make_build | |
run: | | |
make all -s && ls build | |
env: | |
VERSION: ${{ env.TAG }} | |
- name: Release Upload Assets | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: true | |
files: | | |
build/*.gz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |