Skip to content

Change CGO_ENABLED to 0 #5

Change CGO_ENABLED to 0

Change CGO_ENABLED to 0 #5

Workflow file for this run

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: |
CGO_ENABLED=0 go build -o SSHBannerChanger -v ./... # 根据需要构建你的项目
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: v1.0.${{ github.run_number }} # 使用运行编号作为版本标签
name: Release v1.0.${{ github.run_number }} # 修正为有效参数
draft: false
prerelease: false
files: SSHBannerChanger
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}