2020-03-04 21:01:23 +00:00
|
|
|
name: Publish
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
2022-09-08 12:56:04 +00:00
|
|
|
- "*"
|
2020-03-04 21:01:23 +00:00
|
|
|
|
|
|
|
jobs:
|
2020-04-19 18:51:04 +00:00
|
|
|
binary:
|
2021-04-11 15:04:12 +00:00
|
|
|
name: Publish ${{ matrix.target }}
|
2020-03-04 21:01:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
2021-04-11 15:04:12 +00:00
|
|
|
fail-fast: false
|
2020-03-04 21:01:23 +00:00
|
|
|
matrix:
|
|
|
|
# This should work with only the `include`s but it currently doesn't because of this bug:
|
|
|
|
# https://github.community/t5/How-to-use-Git-and-GitHub/GitHub-Actions-Matrix-options-dont-work-as-documented/td-p/29558
|
2022-09-08 12:56:04 +00:00
|
|
|
target:
|
2021-04-19 10:11:23 +00:00
|
|
|
- x86_64-apple-darwin
|
2021-04-11 15:04:12 +00:00
|
|
|
- x86_64-unknown-linux-musl
|
|
|
|
- x86_64-pc-windows-gnu
|
|
|
|
- armv7-unknown-linux-musleabihf
|
|
|
|
- armv7-linux-androideabi
|
|
|
|
- aarch64-linux-android
|
2022-05-15 15:05:25 +00:00
|
|
|
- aarch64-unknown-linux-gnu
|
2021-04-11 15:04:12 +00:00
|
|
|
- aarch64-apple-ios
|
2020-03-04 21:01:23 +00:00
|
|
|
include:
|
|
|
|
- os: macos-latest
|
2021-04-19 10:11:23 +00:00
|
|
|
target: x86_64-apple-darwin
|
2020-03-04 21:01:23 +00:00
|
|
|
- os: ubuntu-latest
|
|
|
|
target: x86_64-unknown-linux-musl
|
2021-04-11 15:04:12 +00:00
|
|
|
- os: ubuntu-latest
|
|
|
|
target: x86_64-pc-windows-gnu
|
2020-03-04 21:01:23 +00:00
|
|
|
- os: ubuntu-latest
|
|
|
|
target: armv7-unknown-linux-musleabihf
|
|
|
|
- os: ubuntu-latest
|
|
|
|
target: armv7-linux-androideabi
|
|
|
|
- os: ubuntu-latest
|
|
|
|
target: aarch64-linux-android
|
2022-05-15 15:05:25 +00:00
|
|
|
- os: ubuntu-latest
|
|
|
|
target: aarch64-unknown-linux-gnu
|
2021-04-11 15:04:12 +00:00
|
|
|
- os: macos-latest
|
|
|
|
target: aarch64-apple-ios
|
2020-03-04 21:01:23 +00:00
|
|
|
steps:
|
2022-09-08 12:56:04 +00:00
|
|
|
- uses: hecrj/setup-rust-action@v1.3.4
|
|
|
|
with:
|
|
|
|
rust-version: stable
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Build
|
|
|
|
id: build
|
|
|
|
run: scripts/dot rust release ${{ matrix.target }}
|
|
|
|
- name: Get the version
|
|
|
|
id: get_version
|
|
|
|
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
|
|
|
- name: Upload binaries to release
|
|
|
|
uses: svenstaro/upload-release-action@v1-release
|
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
file: target/tar/navi.${{ steps.build.outputs.EXTENSION }}
|
|
|
|
tag: ${{ github.ref }}
|
|
|
|
asset_name: navi-${{ steps.get_version.outputs.VERSION }}-${{ matrix.target }}.${{ steps.build.outputs.EXTENSION }}
|