From 551969e15ba0248b41fcc7c8d347b4ff9744ef4e Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Sat, 2 Dec 2023 11:49:19 +0100 Subject: [PATCH 1/5] Run presubmit tests on MacOS as well --- .bcr/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bcr/presubmit.yml b/.bcr/presubmit.yml index f04fc6a5..b0eea77d 100644 --- a/.bcr/presubmit.yml +++ b/.bcr/presubmit.yml @@ -1,7 +1,7 @@ bcr_test_module: module_path: "e2e/workspace" matrix: - platform: ["ubuntu2004"] # ["debian10", "macos", "ubuntu2004", "windows"] + platform: ["ubuntu2004", "macos"] # ["debian10", "macos", "ubuntu2004", "windows"] tasks: run_tests: name: "Run test module" From 7eb99c2046f7696c8fb6c016ae9707ac09b91f7a Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Sat, 2 Dec 2023 11:51:53 +0100 Subject: [PATCH 2/5] Update Ubuntu version for presubmit tests --- .bcr/presubmit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bcr/presubmit.yml b/.bcr/presubmit.yml index b0eea77d..4f7258c0 100644 --- a/.bcr/presubmit.yml +++ b/.bcr/presubmit.yml @@ -1,7 +1,7 @@ bcr_test_module: module_path: "e2e/workspace" matrix: - platform: ["ubuntu2004", "macos"] # ["debian10", "macos", "ubuntu2004", "windows"] + platform: ["ubuntu2204", "macos"] # ["debian10", "macos", "ubuntu2004", "windows"] tasks: run_tests: name: "Run test module" From df1439a80ca73a1b80ef34bf22d9fbc0a28d8d93 Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Sat, 2 Dec 2023 11:59:51 +0100 Subject: [PATCH 3/5] Refine release prep script --- .github/workflows/release_prep.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release_prep.sh b/.github/workflows/release_prep.sh index 6e41c74c..d4531660 100755 --- a/.github/workflows/release_prep.sh +++ b/.github/workflows/release_prep.sh @@ -5,20 +5,21 @@ set -o errexit -o nounset -o pipefail # Set by GH actions, see # https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables TAG=${GITHUB_REF_NAME} +VERSION=${TAG:1} # The prefix is chosen to match what GitHub generates for source archives -PREFIX="rules_zig-${TAG:1}" -ARCHIVE="rules_zig-$TAG.tar.gz" +PREFIX="rules_zig-$VERSION" +ARCHIVE="$PREFIX.tar.gz" git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip > $ARCHIVE SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}') cat << EOF -## Using Bzlmod with Bazel 6 +## Using Bzlmod with Bazel >=6 1. Enable with \`common --enable_bzlmod\` in \`.bazelrc\`. 2. Add to your \`MODULE.bazel\` file: \`\`\`starlark -bazel_dep(name = "rules_zig", version = "${TAG:1}") +bazel_dep(name = "rules_zig", version = "$VERSION") \`\`\` ## Using WORKSPACE @@ -27,13 +28,14 @@ Paste this snippet into your `WORKSPACE.bazel` file: \`\`\`starlark load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + http_archive( name = "rules_zig", sha256 = "${SHA}", strip_prefix = "${PREFIX}", - url = "https://github.com/myorg/rules_zig/releases/download/${TAG}/${ARCHIVE}", + url = "https://github.com/aherrmann/rules_zig/releases/download/${TAG}/${ARCHIVE}", ) EOF awk 'f;/--SNIP--/{f=1}' e2e/workspace/WORKSPACE.bazel -echo "\`\`\`" +echo "\`\`\`" From a2d97a743d7a4d59da26bb621a16421e34a34b4b Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Sat, 2 Dec 2023 12:00:34 +0100 Subject: [PATCH 4/5] Update BCR download URL --- .bcr/source.template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bcr/source.template.json b/.bcr/source.template.json index 4f148199..902c2386 100644 --- a/.bcr/source.template.json +++ b/.bcr/source.template.json @@ -1,5 +1,5 @@ { "integrity": "", "strip_prefix": "{REPO}-{VERSION}", - "url": "https://github.com/{OWNER}/{REPO}/archive/refs/tags/{TAG}.tar.gz" + "url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}-{VERSION}.tar.gz" } From acd8fbb85a31322296e80be6498dd6de521f940e Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Sat, 2 Dec 2023 12:04:12 +0100 Subject: [PATCH 5/5] Update release configuration --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e6cd3b0..6d73599e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,10 +22,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Prepare release notes and artifacts - run: .github/workflows/release_prep.sh ${{ env.GITHUB_REF_NAME }} > release_notes.txt + run: .github/workflows/release_prep.sh > release_notes.txt - name: Release uses: softprops/action-gh-release@v1 with: + draft: true prerelease: true # Use GH feature to populate the changelog automatically generate_release_notes: true