github.com/iotexproject/iotex-core@v1.14.1-rc1/.github/workflows/release.yaml (about) 1 name: Release 2 3 on: 4 push: 5 tags: 6 - "v[0-9]+.[0-9]+.[0-9]+" 7 8 jobs: 9 build: 10 name: Release 11 runs-on: ${{ matrix.os }} 12 strategy: 13 matrix: 14 include: 15 - os: ubuntu-latest 16 artifact_name: ioctl-linux-amd64 17 server_artifact_name: iotex-core-linux-amd64 18 - os: windows-latest 19 artifact_name: ioctl-windows-amd64.exe 20 server_artifact_name: iotex-core-windows-amd64.exe 21 - os: macos-latest 22 artifact_name: ioctl-darwin-amd64 23 server_artifact_name: iotex-core-darwin-amd64 24 steps: 25 - name: Checkout code 26 uses: actions/checkout@v2 27 28 - name: Set up Go 29 uses: actions/setup-go@v2 30 with: 31 go-version: 1.19.12 32 33 - name: make iotex-server/ioctl 34 if: startsWith(matrix.os, 'windows-latest') != true 35 run: | 36 make build 37 38 - name: make iotex-server/ioctl windows 39 if: startsWith(matrix.os, 'windows-latest') 40 run: | 41 make ioctl 42 43 - name: Upload iotex-core binaries to release 44 if: startsWith(matrix.os, 'windows-latest') != true 45 uses: svenstaro/upload-release-action@v2 46 with: 47 repo_token: ${{ secrets.GITHUB_TOKEN }} 48 file: ./bin/server 49 asset_name: ${{ matrix.server_artifact_name }} 50 tag: ${{ github.ref }} 51 52 - name: Configure iotex-core GPG Linux/MacOS 53 if: startsWith(matrix.os, 'windows-latest') != true 54 env: 55 GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} 56 GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} 57 run: | 58 export GPG_TTY=$(tty) 59 echo "$GPG_SIGNING_KEY" | gpg --batch --import 60 echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab ./bin/server 61 62 - name: Upload iotex-core signature 63 if: startsWith(matrix.os, 'windows-latest') != true 64 uses: svenstaro/upload-release-action@v2 65 with: 66 repo_token: ${{ secrets.GITHUB_TOKEN }} 67 asset_name: ${{ matrix.server_artifact_name }}.asc 68 file: ./bin/server.asc 69 tag: ${{ github.ref }} 70 71 - name: Upload ioctl binaries to release 72 uses: svenstaro/upload-release-action@v2 73 with: 74 repo_token: ${{ secrets.GITHUB_TOKEN }} 75 file: ./bin/ioctl 76 asset_name: ${{ matrix.artifact_name }} 77 tag: ${{ github.ref }} 78 79 - name: Configure ioctl GPG Linux/MacOS 80 if: startsWith(matrix.os, 'windows-latest') != true 81 env: 82 GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} 83 GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} 84 run: | 85 export GPG_TTY=$(tty) 86 echo "$GPG_SIGNING_KEY" | gpg --batch --import 87 echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab ./bin/ioctl 88 89 - name: Configure ioctl GPG Windows 90 if: startsWith(matrix.os, 'windows-latest') 91 env: 92 GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} 93 GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} 94 run: | 95 echo $env:GPG_SIGNING_KEY | gpg --batch --import 96 gpg --passphrase "$env:GPG_PASSPHRASE" --batch --pinentry-mode loopback -ab ./bin/ioctl 97 98 - name: Upload ioctl signature 99 uses: svenstaro/upload-release-action@v2 100 with: 101 repo_token: ${{ secrets.GITHUB_TOKEN }} 102 asset_name: ${{ matrix.artifact_name }}.asc 103 file: ./bin/ioctl.asc 104 tag: ${{ github.ref }}