Skip to content

Commit

Permalink
Create go.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Myts2 authored Nov 6, 2024
1 parent c105e8b commit df573d3
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release on Commit

on:
push:
branches:
- main # 替换为你的主分支名称

jobs:
create-release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.21' # 指定 Go 的版本

- name: Build
run: |
go build -v ./... # 根据需要构建你的项目
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ github.run_number }} # 使用运行编号作为版本标签
release_name: Release v${{ github.run_number }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit df573d3

Please sign in to comment.