Skip to content

Commit

Permalink
workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
wudanyang committed Dec 21, 2024
1 parent b9457c1 commit b947f5e
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
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

0 comments on commit b947f5e

Please sign in to comment.