-
Notifications
You must be signed in to change notification settings - Fork 330
104 lines (92 loc) · 3.47 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
build:
name: Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: ioctl-linux-amd64
server_artifact_name: iotex-core-linux-amd64
- os: windows-latest
artifact_name: ioctl-windows-amd64.exe
server_artifact_name: iotex-core-windows-amd64.exe
- os: macos-latest
artifact_name: ioctl-darwin-amd64
server_artifact_name: iotex-core-darwin-amd64
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21.4
- 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: |
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 ioctl binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./bin/ioctl
asset_name: ${{ matrix.artifact_name }}
tag: ${{ github.ref }}
- 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 ./bin/ioctl
- 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 ./bin/ioctl
- name: Upload ioctl signature
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
asset_name: ${{ matrix.artifact_name }}.asc
file: ./bin/ioctl.asc
tag: ${{ github.ref }}