-
Notifications
You must be signed in to change notification settings - Fork 280
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
Showing
5 changed files
with
69 additions
and
104 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
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,63 @@ | ||
name: toughradius release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
name: Build and Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.21' | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
# Build for ARM64 | ||
- name: Build for ARM64 | ||
run: | | ||
mkdir -p ./release | ||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -ldflags '-s -w -extldflags "-static"' -o ./release/toughradius_arm64 main.go | ||
# Build for AMD64 | ||
- name: Build for AMD64 | ||
run: | | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags '-s -w -extldflags "-static"' -o ./release/toughradius_amd64 main.go | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
||
# Upload ARM64 Asset | ||
- name: Upload Release Asset for ARM64 | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./release/toughradius_arm64 | ||
asset_name: toughradius_arm64 | ||
asset_content_type: application/octet-stream | ||
|
||
# Upload AMD64 Asset | ||
- name: Upload Release Asset for AMD64 | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./release/toughradius_amd64 | ||
asset_name: toughradius_amd64 | ||
asset_content_type: application/octet-stream |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
BuildVersion=latest v8.0.4 2024-01-10 01:01:08 | ||
BuildVersion=latest v8.0.4 2024-01-18 15:23:34 | ||
ReleaseVersion=v8.0.4 | ||
BuildTime=2024-01-10 01:01:08 | ||
BuildTime=2024-01-18 15:23:34 | ||
BuildName=toughradius | ||
CommitID=5564f4a00f2aa7d38e90a83f29a3a8f1fdab5b24 | ||
CommitDate=Tue, 2 Jan 2024 02:00:21 +0800 | ||
CommitID=48ea29e6eddf11ce25e586beee529f51e5b5e85f | ||
CommitDate=Wed, 10 Jan 2024 01:01:19 +0800 | ||
[email protected] | ||
CommitSubject=2024-01-02 02:00:12 : | ||
CommitSubject=2024-01-10 01:01:08 : readme |