Skip to content

ci(release): remove obsolete prints #31

ci(release): remove obsolete prints

ci(release): remove obsolete prints #31

Workflow file for this run

name: "Testing"
on:
workflow_dispatch:
push:
branches:
- "**"
pull_request:
branches:
- "**"
permissions:
contents: write
defaults:
run:
shell: bash
concurrency:
group: "${{ github.workflow }}@${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
jobs:
test:
name: Test
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
CACHE_PATH: ${{ matrix.os == 'macos-latest' && '/private/var/tmp/_bazel_runner/' || '~/.cache/bazel' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Bazel
uses: bazel-contrib/setup-bazel@0.8.5
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Cache Bazel
uses: actions/cache@v4
with:
path: ${{ env.CACHE_PATH }}
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE', 'MODULE.bazel') }}
restore-keys: |
${{ runner.os }}-bazel-
- name: Build Bazel artifacts
run: |
bazel --output_user_root=${{ env.CACHE_PATH }} build //...
- name: Test Bazel artifacts
run: |
bazel --output_user_root=${{ env.CACHE_PATH }} test //...
# Fail here if tests didn't succeed
- name: Generate Release artifacts
if: ${{ success() }}
run: |
scripts/release.sh executables
scripts/release.sh tarballs
- name: Upload Release artifacts
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: distributables
path: |
dist/*.tar.gz
dist/*.txt
dispatch:
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Dispatch a release workflow run
if: ${{ !failure() }}
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const payload = {
run_id: "${{ github.run_id }}",
sha: "${{ github.sha }}"
}
console.log("Sending event payload", JSON.stringify(payload, null, 2));
const { owner, repo } = context.repo;
await github.rest.repos.createDispatchEvent({
owner,
repo,
event_type: 'release',
client_payload: payload
});