diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 534534f..bfce9e1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,6 +8,8 @@ on: branches: [main] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: + # Can be triggered from the release.yaml workflow + workflow_call: concurrency: # Cancel previous actions from the same PR or branch except 'main' branch. # See https://docs.github.com/en/actions/using-jobs/using-concurrency and https://docs.github.com/en/actions/learn-github-actions/contexts for more info. diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9bde29d..e73158f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,13 +19,20 @@ permissions: attestations: write contents: write jobs: + ci: + uses: ./.github/workflows/ci.yaml release: + needs: ci uses: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@v7.2.3 with: release_files: rules_devicetree-*.tar.gz prerelease: false tag_name: ${{ inputs.tag_name || github.ref_name }} + # We don't need to run tests; `needs: ci` above already does this. + bazel_test_command: true publish: + # TODO: #5 - re-enable auto-publishing after release + if: false needs: release uses: ./.github/workflows/publish.yaml with: diff --git a/.github/workflows/release_prep.sh b/.github/workflows/release_prep.sh index 92b4065..88a4b34 100755 --- a/.github/workflows/release_prep.sh +++ b/.github/workflows/release_prep.sh @@ -16,10 +16,9 @@ git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip > $ARCHIVE SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}') cat << EOF -## Using Bzlmod with Bazel 6 or greater +## Using Bzlmod with Bazel 7 or greater -1. (Bazel 6 only) Enable with \`common --enable_bzlmod\` in \`.bazelrc\`. -2. Add to your \`MODULE.bazel\` file: +Add to your \`MODULE.bazel\` file: \`\`\`starlark bazel_dep(name = "rules_devicetree", version = "${TAG:1}") diff --git a/.github/workflows/tag.yaml b/.github/workflows/tag.yaml index 906965d..b0b7410 100644 --- a/.github/workflows/tag.yaml +++ b/.github/workflows/tag.yaml @@ -50,7 +50,7 @@ jobs: uses: smlx/ccv@7318e2f25a52dcd550e75384b84983973251a1f8 # v0.10.0 release: needs: tag - uses: ./.github/workflows/release.yml + uses: ./.github/workflows/release.yaml with: tag_name: ${{ needs.tag.outputs.new-tag-version }} secrets: diff --git a/docs/installation.md b/docs/installation.md index ae44b7d..147c111 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,10 +1,9 @@ # Installation (Bzlmod) -Note: There are currently no version registered against Bazel Central Registry, -so `bazel_dep()` alone does not work yet. This will work later once we have a -stable release. - -Note: Please update the version accordingly. +Please update the version accordingly. +For the most recent release, refer to +[https://registry.bazel.build/modules/rules_devicetree](https://registry.bazel.build/modules/rules_devicetree) +to update the version. ```starlark bazel_dep(