Skip to content

ci: consolidate CI workflows and package with bazel #63

ci: consolidate CI workflows and package with bazel

ci: consolidate CI workflows and package with bazel #63

Workflow file for this run

---
name: CI
on: # yamllint disable rule:truthy
push:
branches:
- master
tags:
- "*.*.*"
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test fetch
run: bazel fetch //...
- name: Test
run: bazel test //...
test-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Test
run: bazel test //...
examples:
runs-on: ubuntu-latest
strategy:
matrix:
example:
- bzlmod
- check_glob
- released_example
steps:
- uses: actions/checkout@v4
- name: Test
run: bazel test //...
working-directory: examples/${{ matrix.example }}
release:
runs-on: ubuntu-latest
needs:
- build
- test-mac
- examples
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create release archive and notes
run: |
# Set by GH actions, see
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
bazel run \
--stamp --embed_label "${{ github.ref_name }}" \
//:release -- release
- name: Release
if: ${{ github.event != 'pull_request' }}
uses: softprops/action-gh-release@v1
with:
# Use GH feature to populate the changelog automatically
generate_release_notes: true
body_path: release/release_notes.md
fail_on_unmatched_files: true
files: release/rules_shellcheck-*.tar.gz