Skip to content

doc: slight doc improvement #1

doc: slight doc improvement

doc: slight doc improvement #1

Workflow file for this run

# Cut a release whenever a new tag is pushed to the repo.
# You should use an annotated tag, like `git tag -a 1.2.3`
# and put the release notes into the commit message for the tag.
name: Release
on:
push:
tags:
- "*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: bazelbuild/setup-bazelisk@v1
- name: Check git state is clean
run: git status --porcelain
- name: Export release version
run: 'echo "RELEASE_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV'
- name: Build release archive
env:
# Bazelisk will download bazel to here
XDG_CACHE_HOME: ~/.cache/bazel-repo
run: bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc build //:bazel_rules_jq
- name: Set versioned archive name
run: cp bazel-bin/bazel_rules_jq.tar.gz bazel-bin/bazel_rules_jq-v${{ env.RELEASE_VERSION }}.tar.gz
- name: Export checksum
run: 'echo "RELEASE_CHECKSUM=$(shasum -b -a 256 bazel-bin/bazel_rules_jq-v${{ env.RELEASE_VERSION }}.tar.gz | cut -d " " -f 1)" >> $GITHUB_ENV'
- name: Upload release
uses: softprops/action-gh-release@v1
with:
files: bazel-bin/bazel_rules_jq-v${{ env.RELEASE_VERSION }}.tar.gz
fail_on_unmatched_files: true
body: |
```starlark
http_archive(
name = "bazel_rules_jq",
sha256 = "${{ env.RELEASE_CHECKSUM }}",
url = "https://github.com/jqlang/bazel_rules_jq/releases/download/${{ env.RELEASE_VERSION }}/bazel_rules_jq-v${{ env.RELEASE_VERSION }}.tar.gz",
)
```