Merge pull request #154 from bandlab/optional-android-sdk-ndk #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: | |
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
name: Release | |
jobs: | |
build: | |
name: Release | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Cache bazel build results | |
uses: actions/cache@v2 | |
env: | |
cache-name: bazel-cache | |
with: | |
path: ~/.cache/bazel | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.ref }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.cache-name }}-master | |
- name: Build | |
run: bazel build //src:djinni_deploy.jar | |
- name: Generator | |
run: bazel build //generator:generator | |
- name: Test generator | |
run: bazel run //generator:generator -- --help | |
- name: Creating bat | |
run: cp bazel-bin/generator/djinni bazel-bin/generator/djinni.bat | |
- name: Creating support lib package | |
run: tar -zcvf support-lib.tar.gz support-lib | |
- name: Get upload url for latest release | |
run: | | |
echo "UPLOAD_URL=$(curl -sL https://api.github.com/repos/${{github.repository}}/releases/latest | jq -r '.upload_url')" >> $GITHUB_ENV | |
shell: bash | |
- name: Upload release asset for macOS/Linux | |
id: upload-release-asset-unix | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ env.UPLOAD_URL }} | |
asset_path: bazel-bin/generator/djinni | |
asset_name: djinni | |
asset_content_type: application/octet-stream | |
- name: Upload release asset for Windows | |
id: upload-release-asset-windows | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ env.UPLOAD_URL }} | |
asset_path: bazel-bin/generator/djinni.bat | |
asset_name: djinni.bat | |
asset_content_type: application/bat | |
- name: Upload support lib | |
id: upload-release-asset-support-lib | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ env.UPLOAD_URL }} | |
asset_path: support-lib.tar.gz | |
asset_name: support-lib.tar.gz | |
asset_content_type: application/tar+gzip |