Skip to content

fix:修改工作流文件7 #10

fix:修改工作流文件7

fix:修改工作流文件7 #10

Workflow file for this run

name: Release Coss Cli
on:
push:
tags:
- 'v*.*.*' # 只在 tag push 时触发工作流
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.22
env:
GO: go
VERSION: ${{ github.ref_name }}
TAG: ${{ github.ref_name }}
- name: Build
run: |
make package
# 输出构建好的文件
ls ./build/*
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: ${{ github.ref_name }}
body: Release version ${{ github.ref_name }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/*
asset_content_type: application/octet-stream