feat(ci): Add github action #3
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
name: Build and Publish | |
on: | |
push: | |
branches: | |
- master | |
# push: | |
# tags: | |
# - 'v*' # Trigger on version tags, e.g., v1.0.0 | |
jobs: | |
build: | |
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.23' | |
- name: Build the binary | |
# run: go build -o my-go-binary ./main.go # Adjust the output name and path as needed | |
run: make build | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
with: | |
# tag_name: ${{ github.ref }} | |
files: hf-utils* # Adjust the binary name if necessary | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub token for authentication |