Skip to content

Commit fd24b17

Browse files
jDramaixcopybara-github
authored andcommitted
Add script to prepare github release.
PiperOrigin-RevId: 788649427
1 parent e2d9052 commit fd24b17

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/release_prep.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
# This file is used to prepare the githubrelease.
3+
# It is not intended to be run directly but called from the github release
4+
# workflow: bazel-contrib/.github/workflows/release_ruleset.yaml\
5+
set -euo pipefail
6+
7+
tag="$1"
8+
# The prefix is used to determine the directory structure of the archive. We strip the 'v'
9+
# prefix from the version number.
10+
directory="jsinterop-annotations-${tag#v}"
11+
archive="jsinterop-annotations-${tag}.tar.gz"
12+
13+
git archive --format=tar --prefix=${directory}/ -o "${archive}" ${tag}
14+
15+
# The stdout of this program will be used as the top of the release notes for this release.
16+
cat << EOF
17+
## Using Bazel 8 or later, add to your \`MODULE.bazel\` file:
18+
19+
\`\`\`starlark
20+
bazel_dep(name = "jsinterop_annotations", version = "${tag}")
21+
\`\`\`
22+
EOF

0 commit comments

Comments
 (0)