Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ bcr_test_module:
module_path: "examples"
matrix:
platform: ["macos_arm64", "ubuntu2004", "ubuntu2004_arm64"]
bazel: ["7.x", "8.x"]
bazel: ["7.x", "8.x", "9.x"]
tasks:
run_tests:
name: "Run test module"
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/bcr-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# See https://github.com/bazel-contrib/publish-to-bcr
name: Publish to BCR

on:
# Allow the publish workflow to be called from another workflow.
# In this case, we trigger it from the release.yaml workflow.
workflow_call:
inputs:
release_version:
required: true
type: string
secrets:
BCR_PUBLISH_TOKEN:
required: true
# In case of problems, let release engineers retry by manually dispatching
# the workflow from the GitHub UI.
workflow_dispatch:
inputs:
release_version:
required: true
type: string
description: Release version to publish to the Bazel Central Registry
templates_ref:
default: ''
type: string
description: Override the ref to read .bcr templates from
jobs:
publish:
uses: bazel-contrib/publish-to-bcr/.github/workflows/[email protected]
with:
attest: false
tag_name: ${{ inputs.release_version }}
author_name: periareon-bot
author_email: [email protected]
# Tags don't include a "v" prefix
tag_prefix: ""
# GitHub repository which is a fork of the upstream where the Pull Request will be opened.
registry_fork: periareon/bazel-central-registry
templates_ref: ${{ inputs.templates_ref || inputs.release_version }}
draft: false
permissions:
contents: write
secrets:
publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,19 @@ jobs:
contents: write
actions: write
attestations: write
outputs:
release_version: ${{ steps.version.outputs.release_version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: main
- name: Detect the current version
id: version
run: |
version="$(grep 'VERSION =' ./version.bzl | sed 's/VERSION = "//' | sed 's/"//')"
echo "RELEASE_VERSION=${version}" >> $GITHUB_ENV
echo "release_version=${version}" >> $GITHUB_OUTPUT
# Ensure this does not exclude the module used for the .bcr presubmit job.
- name: Create release artifact
run: |
Expand Down Expand Up @@ -61,3 +65,13 @@ jobs:
asset_name: rules_tcl-${{ env.RELEASE_VERSION }}.tar.gz
asset_path: ${{ github.workspace }}/.github/rules_tcl.tar.gz
asset_content_type: application/gzip

bcr-publish:
needs: [release]
permissions:
contents: write
uses: ./.github/workflows/bcr-publish.yaml
with:
release_version: ${{ needs.release.outputs.release_version }}
secrets:
BCR_PUBLISH_TOKEN: ${{ secrets.BCR_PUBLISH_TOKEN }}
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module(
name = "rules_tcl",
version = "0.1.1",
version = "0.2.0",
)

bazel_dep(name = "bazel_skylib", version = "1.8.2")
Expand Down
2 changes: 1 addition & 1 deletion version.bzl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
""""rules_tcl version"""

VERSION = "0.1.1"
VERSION = "0.2.0"
Loading