Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiesun committed Jan 18, 2024
2 parents b180507 + bc0eede commit 9a9a5e9
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 104 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Publish
name: toughradius docker build and publish

on:
# run it on push to the default repository branch
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/release-publish.yml
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
49 changes: 0 additions & 49 deletions .github/workflows/release_arm64.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/release_x86-64.yml

This file was deleted.

10 changes: 5 additions & 5 deletions assets/buildinfo.txt
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

0 comments on commit 9a9a5e9

Please sign in to comment.