-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wudanyang
committed
Dec 21, 2024
1 parent
b9457c1
commit b947f5e
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Create Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' # Trigger this action only when a tag starting with "v" is pushed | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the repository code | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
# Set up Go (since this is a Go project) | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.22' # Replace with your Go version if different | ||
|
||
# Build the project (optional, depending on whether you want to include the binary in the release) | ||
- name: Build Project | ||
run: | | ||
go build -o simple-file-sync . | ||
# Create a new GitHub release | ||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ./simple-file-sync # Path to your built binary (you can adjust this based on your build output) | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Upload the release assets (e.g., binary files or archives) | ||
# This step is handled by the action-gh-release above, but if needed, you can customize |