Skip to content

fix: re-import missing bazel_skylib (#181) #71

fix: re-import missing bazel_skylib (#181)

fix: re-import missing bazel_skylib (#181) #71

Workflow file for this run

---
name: Release
# yamllint disable-line rule:truthy
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-24.04
steps:
-
name: Clone Repo
uses: actions/[email protected]
-
name: re-confirm a build
run: bazel run //docs:collate_docs
release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
needs: [build]
steps:
-
name: Cut Github Release
uses: googleapis/release-please-action@v4
# Settings -> Actions -> General -> Workflow Permissions
# - select "Read repo contents", and
# - enable "Allow Github Actions to create and approve pull requests"
id: release
with:
release-type: bazel
-
name: Date-Based Cache key
# get a key showing the current week (ISO: yyyyWww) allowing older caches to age-out/autoprune
id: week
run: echo "::set-output name=iso::$(date +'bazel-%YW%U')"
-
uses: bazel-contrib/[email protected]
if: ${{ steps.release.outputs.release_created }}
with:
# Cache bazel downloads via bazelisk
bazelisk-cache: true
# Store build cache per week
disk-cache: ${{ steps.week.outputs.iso }}
# Share repository cache between workflows.
repository-cache: true
-
name: Clone Repo
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4
-
name: Canonicalize Parameters
# I was using this to canonicalize version/tag but now it helps reuse workflows
id: params
if: ${{ steps.release.outputs.release_created }}
run: |
echo "::set-output name=semver::$(echo ${{ steps.release.outputs.tag_name }} | sed -e 's/^v//g')"
echo "::set-output name=name::$(echo ${GITHUB_REPOSITORY} | cut -d / -f 2)"
echo "::set-output name=prefix::$(echo ${GITHUB_REPOSITORY} | cut -d / -f 2)-${{ steps.release.outputs.tag_name }}"
echo "::set-output name=tag_name::${{ steps.release.outputs.tag_name }}"
-
name: Cut Size-Optimized Archive
env:
PREFIX: ${{ steps.params.outputs.prefix }}
TAG: ${{ steps.params.outputs.tag_name }}
if: ${{ steps.release.outputs.release_created }}
run: git archive --format=tar --prefix=${PREFIX}/ $(git log -1 --format=%H) | xz -c9 > ${PREFIX}.tar.xz
-
name: Upload Size-Optimized Archive
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PREFIX: ${{ steps.params.outputs.prefix }}
TAG: ${{ steps.release.outputs.tag_name }}
if: ${{ steps.release.outputs.release_created }}
run: gh release upload ${TAG} ${PREFIX}.tar.xz
-
name: Collate Docs
if: ${{ steps.release.outputs.release_created }}
run: bazel run //docs:collate_docs
-
name: Deploy docs
if: ${{ steps.release.outputs.release_created }}
uses: mhausenblas/[email protected]
# Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme
env:
CONFIG_FILE: mkdocs.yml
EXTRA_PACKAGES: build-base
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# see https://github.com/marketplace/actions/deploy-mkdocs#example-usage
# REQUIREMENTS: folder/requirements.txt
-
run: bazel shutdown