2020-03-04 21:01:23 +00:00
|
|
|
name: Publish
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
|
|
|
|
jobs:
|
2020-04-19 18:51:04 +00:00
|
|
|
|
|
|
|
alfred:
|
|
|
|
name: Publish Alfred workflow
|
2020-04-19 18:56:01 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-04-19 18:51:04 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Zip
|
|
|
|
run: scripts/action workflow
|
|
|
|
- name: Get the version
|
|
|
|
id: get_version
|
|
|
|
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
|
|
|
- name: Upload workflow to release
|
|
|
|
uses: svenstaro/upload-release-action@v1-release
|
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
file: target/workflow/navi.zip
|
|
|
|
tag: ${{ github.ref }}
|
|
|
|
asset_name: navi-${{ steps.get_version.outputs.VERSION }}.alfredworkflow
|
|
|
|
|
|
|
|
binary:
|
|
|
|
name: Publish binary for ${{ matrix.os }}
|
2020-03-04 21:01:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
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
|
|
|
|
target: [x86_64-osx, x86_64-unknown-linux-musl, armv7-unknown-linux-musleabihf, armv7-linux-androideabi, aarch64-linux-android]
|
|
|
|
include:
|
|
|
|
- os: macos-latest
|
|
|
|
target: x86_64-osx
|
|
|
|
- os: ubuntu-latest
|
|
|
|
target: x86_64-unknown-linux-musl
|
|
|
|
- os: ubuntu-latest
|
|
|
|
target: armv7-unknown-linux-musleabihf
|
|
|
|
- os: ubuntu-latest
|
|
|
|
target: armv7-linux-androideabi
|
|
|
|
- os: ubuntu-latest
|
|
|
|
target: aarch64-linux-android
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: hecrj/setup-rust-action@v1.3.1
|
|
|
|
with:
|
|
|
|
rust-version: stable
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Build
|
|
|
|
run: scripts/action release ${{ matrix.target }}
|
2020-03-16 13:34:40 +00:00
|
|
|
- name: Get the version
|
|
|
|
id: get_version
|
|
|
|
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
2020-03-04 21:01:23 +00:00
|
|
|
- name: Upload binaries to release
|
|
|
|
uses: svenstaro/upload-release-action@v1-release
|
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
file: target/tar/navi.tar.gz
|
2020-03-16 11:21:28 +00:00
|
|
|
tag: ${{ github.ref }}
|
2020-03-16 13:34:40 +00:00
|
|
|
asset_name: navi-${{ steps.get_version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
|