Allow sha-file to be optional (#329) #21
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
name: Release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
native-image: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-18.04] | |
include: | |
- os: macos-latest | |
graal_url: https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-20.0.0/graalvm-ce-java11-darwin-amd64-20.0.0.tar.gz | |
artifact: bazel-deps-macos | |
bazel_installer_sha: 967189ebadd6b65b1dd25464fdd4d2fcff7a00e0b776be425b19e283432d7862 | |
bazel_version: 4.2.1 | |
- os: ubuntu-18.04 | |
graal_url: https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-20.0.0/graalvm-ce-java11-linux-amd64-20.0.0.tar.gz | |
artifact: bazel-deps-linux | |
bazel_installer_sha: 35f398ad93af2b5eadd4b6b4fd4d4803b726029e572f40c4e1fe736db3de944b | |
bazel_version: 4.2.1 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Bazel output cache | |
id: cache-bazel | |
uses: actions/cache@v1 | |
with: | |
path: "${{ github.workspace }}/.bazel-cache" | |
key: ${{ runner.os }}-bazel-out-${{ github.run_id}} | |
restore-keys: | | |
${{ runner.os }}-bazel-out- | |
- name: Configure bazel config for actions | |
run: | | |
echo "build --config github_actions" > user.bazelrc | |
echo "build --disk_cache ${{ github.workspace }}/.bazel-cache/disk-cache" >> user.bazelrc | |
echo "build --repository_cache ${{ github.workspace }}/.bazel-cache/repo-cache" >> user.bazelrc | |
- name: Install bazel | |
run: ./ci_scripts/ci_install_bazel.sh | |
env: | |
BAZEL_VERSION: ${{ matrix.bazel_version }} | |
BAZEL_INSTALLER_SHA: ${{ matrix.bazel_installer_sha }} | |
BAZEL_BIN_LOC: "${{ github.workspace }}/.bazel-cache/bazel-bin" | |
- name: Build fat jar | |
run: ./ci_scripts/build_fat_jar.sh | |
env: | |
BAZEL_VERSION: ${{ matrix.bazel_version }} | |
BAZEL_INSTALLER_SHA: ${{ matrix.bazel_installer_sha }} | |
BAZEL_BIN_LOC: "${{ github.workspace }}/.bazel-cache/bazel-bin" | |
- uses: olafurpg/setup-scala@v10 | |
- run: jabba install graal-custom@20.0=tgz+${{ matrix.graal_url }} | |
- name: Make native image | |
run: ./ci_scripts/make_native_artifact.sh ${{ matrix.graal_url }} | |
- name: Prepare outputs from platform run | |
run: ./ci_scripts/prepare_output.sh ${{ matrix.artifact }} staging-directory | |
- uses: actions/upload-artifact@master | |
with: | |
name: ${{ matrix.artifact }} | |
path: staging-directory | |
make_release: | |
name: Make release | |
needs: native-image | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download linux bazel-deps | |
uses: actions/download-artifact@v1 | |
with: | |
name: bazel-deps-linux | |
path: downloads | |
- name: Download macos bazel-deps | |
uses: actions/download-artifact@v1 | |
with: | |
name: bazel-deps-macos | |
path: downloads | |
- name: show downloads | |
run : ls -R downloads | |
- name: Build update_dependencies.sh | |
run: ./ci_scripts/make_update_dependencies.sh "v0.1-${{ github.run_number }}" | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "v0.1-${{ github.run_number }}" | |
prerelease: false | |
title: "Auto generated release" | |
files: | | |
downloads/bazel-deps-macos | |
downloads/bazel-deps-macos.sha256 | |
downloads/bazel-deps-linux | |
downloads/bazel-deps-linux.sha256 | |
update_dependencies.sh | |
id: "automatic_releases" |