|
6 | 6 |
|
7 | 7 | jobs: |
8 | 8 | release: |
| 9 | + outputs: |
| 10 | + version: ${{ steps.release.outputs.version }} |
9 | 11 | runs-on: ubuntu-latest |
10 | 12 | name: Perform release |
11 | 13 |
|
|
52 | 54 | with: |
53 | 55 | body_path: GITHUB_CHANGELOG.md |
54 | 56 | tag_name: ${{ steps.release.outputs.version }} |
| 57 | + |
| 58 | + binary: |
| 59 | + needs: release |
| 60 | + name: Publish binary for ${{ matrix.os }} |
| 61 | + runs-on: ${{ matrix.os }} |
| 62 | + strategy: |
| 63 | + matrix: |
| 64 | + # This should work with only the `include`s but it currently doesn't because of this bug: |
| 65 | + # https://github.community/t5/How-to-use-Git-and-GitHub/GitHub-Actions-Matrix-options-dont-work-as-documented/td-p/29558 |
| 66 | + target: [ x86_64-osx, x86_64-unknown-linux-musl, armv7-unknown-linux-musleabihf, armv7-linux-androideabi, aarch64-linux-android ] |
| 67 | + include: |
| 68 | + - os: macos-latest |
| 69 | + target: x86_64-osx |
| 70 | + - os: ubuntu-latest |
| 71 | + target: x86_64-unknown-linux-musl |
| 72 | + - os: ubuntu-latest |
| 73 | + target: armv7-unknown-linux-musleabihf |
| 74 | + - os: ubuntu-latest |
| 75 | + target: armv7-linux-androideabi |
| 76 | + - os: ubuntu-latest |
| 77 | + target: aarch64-linux-android |
| 78 | + |
| 79 | + steps: |
| 80 | + - name: install open-ssl |
| 81 | + if: ${{ runner.os == 'Linux' }} |
| 82 | + run: | |
| 83 | + sudo apt-get -y install libssl-dev pkg-config musl-dev musl-tools |
| 84 | +
|
| 85 | + - uses: hecrj/setup-rust-action@v1 |
| 86 | + with: |
| 87 | + rust-version: stable |
| 88 | + |
| 89 | + - uses: actions/checkout@v1 |
| 90 | + - name: Build |
| 91 | + run: ci/action.sh release ${{ matrix.target }} |
| 92 | + |
| 93 | + - name: Get the version |
| 94 | + id: get_version |
| 95 | + run: echo ::set-output name=VERSION::${needs.release.outputs.version} |
| 96 | + |
| 97 | + - name: Upload binaries to release |
| 98 | + uses: svenstaro/upload-release-action@v1-release |
| 99 | + with: |
| 100 | + repo_token: ${{ secrets.GITHUB_TOKEN }} |
| 101 | + file: target/tar/bombadil.tar.gz |
| 102 | + tag: ${{ github.ref }} |
| 103 | + asset_name: bombadil-${{ steps.get_version.outputs.VERSION }}-${{ matrix.target }}.tar.gz |
0 commit comments