Skip to content

Commit

Permalink
Showing 1 changed file with 48 additions and 16 deletions.
64 changes: 48 additions & 16 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -14,13 +14,13 @@ jobs:
include:
- os: ubuntu-latest
artifact_name: ioctl-linux-amd64
asset_name: ioctl-linux-amd64
server_artifact_name: iotex-core-linux-amd64
- os: windows-latest
artifact_name: ioctl-windows-amd64.exe
asset_name: ioctl-windows-amd64.exe
server_artifact_name: iotex-core-windows-amd64.exe
- os: macos-latest
artifact_name: ioctl-darwin-amd64
asset_name: ioctl-darwin-amd64
server_artifact_name: iotex-core-darwin-amd64
steps:
- name: Checkout code
uses: actions/checkout@v2
@@ -30,43 +30,75 @@ jobs:
with:
go-version: 1.18.5

- name: make ioctl
- name: make iotex-server/ioctl
if: startsWith(matrix.os, 'windows-latest') != true
run: |
make build
- name: make iotex-server/ioctl windows
if: startsWith(matrix.os, 'windows-latest')
run: |
make ioctl
- name: Upload iotex-core binaries to release
if: startsWith(matrix.os, 'windows-latest') != true
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./bin/server
asset_name: ${{ matrix.server_artifact_name }}
tag: ${{ github.ref }}

- name: Configure iotex-core GPG Linux/MacOS
if: startsWith(matrix.os, 'windows-latest') != true
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
set CGO_ENABLED=1
set GOARCH=amd64
go build -tags netgo -o ./${{ matrix.artifact_name }} -v ./tools/ioctl
export GPG_TTY=$(tty)
echo "$GPG_SIGNING_KEY" | gpg --batch --import
echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab ./bin/server
- name: Upload iotex-core signature
if: startsWith(matrix.os, 'windows-latest') != true
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
asset_name: ${{ matrix.server_artifact_name }}.asc
file: ./bin/server.asc
tag: ${{ github.ref }}

- name: Upload binaries to release
- name: Upload ioctl binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
file: ./bin/ioctl
asset_name: ${{ matrix.artifact_name }}
tag: ${{ github.ref }}

- name: Configure GPG Linux/MacOS
- name: Configure ioctl GPG Linux/MacOS
if: startsWith(matrix.os, 'windows-latest') != true
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
export GPG_TTY=$(tty)
echo "$GPG_SIGNING_KEY" | gpg --batch --import
echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab ./${{ matrix.artifact_name }}
echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab ./bin/ioctl
- name: Configure GPG Windows
- name: Configure ioctl GPG Windows
if: startsWith(matrix.os, 'windows-latest')
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
echo $env:GPG_SIGNING_KEY | gpg --batch --import
gpg --passphrase "$env:GPG_PASSPHRASE" --batch --pinentry-mode loopback -ab ./${{ matrix.artifact_name }}
gpg --passphrase "$env:GPG_PASSPHRASE" --batch --pinentry-mode loopback -ab ./bin/ioctl
- name: Upload signature
- name: Upload ioctl signature
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
asset_name: ${{ matrix.artifact_name }}.asc
file: ./${{ matrix.artifact_name }}.asc
file: ./bin/ioctl.asc
tag: ${{ github.ref }}

0 comments on commit fedf9aa

Please sign in to comment.