Merge pull request #25 from rsalvador/rsalvador/jacoco #26
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
name: Tagged Release | |
on: | |
# only when a semver tag is pushed | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Mount bazel cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cache/bazel | |
~/.cache/bazelisk | |
key: bazel | |
- name: Install bazelisk | |
run: | | |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.10.1/bazelisk-linux-amd64" | |
mkdir -p "${GITHUB_WORKSPACE}/bin/" | |
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel" | |
chmod +x "${GITHUB_WORKSPACE}/bin/bazel" | |
- name: Build JdtJavaBuilder_deploy.jar | |
run: | | |
"${GITHUB_WORKSPACE}/bin/bazel" build :JdtJavaBuilder_deploy.jar | |
cp -fv bazel-bin/JdtJavaBuilder_deploy.jar compiler/export/ | |
- name: Test Compile | |
run: | | |
cd examples/ | |
"${GITHUB_WORKSPACE}/bin/bazel" build //... | |
- name: Build Distribution | |
run: | | |
"${GITHUB_WORKSPACE}/bin/bazel" build //dist:all | |
- name: Replace version with tag info | |
# more inspiration at https://blog.pusher.com/continuous-releases-github-actions/ | |
run: | | |
sed -i "s|/latest/|/${{ github.ref_name }}/|" bazel-bin/dist/relnotes.txt | |
- name: Publish Release | |
uses: "softprops/action-gh-release@v1" | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
draft: true | |
body_path: "bazel-bin/dist/relnotes.txt" | |
files: | | |
LICENSE | |
bazel-bin/dist/rules_jdt-*.tar.gz | |
bazel-bin/dist/changelog.txt |