Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test linux-amd64 build #632

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version of zboxcli to release'
required: true
default: '1.0.0'
dry_run:
description: 'Run without making changes'
required: false
default: 'false'

env:
GITHUB_TOKEN: ${{ secrets.GOSDK }}
VERSION: ${{ github.event.inputs.version }}

jobs:
linux_amd64:
name: linux_amd64
runs-on: ubuntu-latest
env:
SRC_DIR: ${{ github.workspace }}/src
OUTPUT_DIR: ${{ github.workspace }}/output
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
path: ${{ env.SRC_DIR }}

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: false

- name: Setup
run : |
mkdir -p ${{ env.OUTPUT_DIR }}

- name: Build
run: |
cd ${{ env.SRC_DIR }}
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -x -v -tags bn256 -ldflags "-X main.VersionStr=${{ env.VERSION }} -linkmode 'external' -extldflags '-static'" -o ${{ env.OUTPUT_DIR }}/zbox .

- name: Zip
uses: montudor/action-zip@v1
with:
args: zip -r ${{ env.OUTPUT_DIR }}/zbox-linux-amd64.zip ${{ env.OUTPUT_DIR }}/zbox

- name: Upload Zip
uses: actions/upload-artifact@v3
with:
name: zbox-linux-amd64
path: ${{ env.OUTPUT_DIR }}/zbox-linux-amd64.zip

Loading