File tree Expand file tree Collapse file tree 2 files changed +31
-6
lines changed Expand file tree Collapse file tree 2 files changed +31
-6
lines changed Original file line number Diff line number Diff line change 1212 steps :
1313 - name : Checkout
1414 uses : actions/checkout@v4
15- - name : Prepare workspace snippet
16- run : .github/workflows/workspace_snippet.sh > release_notes.txt
15+ - name : Create archive
16+ id : archive
17+ run : |
18+ TAG="${GITHUB_REF_NAME}"
19+ REPOSITORY_NAME="${GITHUB_REPOSITORY#*/}"
20+ PREFIX="${REPOSITORY_NAME}-${TAG:1}"
21+ ARCHIVE="${PREFIX}.tar.gz"
22+
23+ echo "tgz=${ARCHIVE}" >> $GITHUB_OUTPUT
24+
25+ git archive --format=tar.gz --prefix="${PREFIX}/" -o "$ARCHIVE" "${TAG}"
26+ - name : Prepare bzlmod / WORKSPACE snippets
27+ run : .github/workflows/prepare_snippets.sh ${{ steps.archive.outputs.tgz }} > release_notes.txt
1728 - name : Generate changelog
1829 run : |
1930 printf '\n-----\n\n' >> release_notes.txt
2334 with :
2435 draft : true
2536 body_path : release_notes.txt
37+ fail_on_unmatched_files : true
38+ files : ${{ steps.archive.outputs.tgz }}
Original file line number Diff line number Diff line change 22
33set -o errexit -o nounset -o pipefail
44
5+ ARCHIVE=" $1 "
6+
57# Set by GH actions, see
68# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
79TAG=${GITHUB_REF_NAME}
810REPO_NAME=${GITHUB_REPOSITORY#*/ }
911PREFIX=" ${REPO_NAME} -${TAG: 1} "
10- URL=" https://github.com/${GITHUB_REPOSITORY} /archive/refs/tags/ ${ TAG} .tar.gz "
12+ URL=" https://github.com/${GITHUB_REPOSITORY} /releases/download/ $ TAG/ $ARCHIVE "
1113
12- if ! SHA=$( curl -sfL " ${URL} " | shasum -a 256 | awk ' {print $1}' ) ; then
13- echo " error: could not determine hash for ${URL } " >&2
14+ if ! SHA=$( shasum -a 256 " $ARCHIVE " | awk ' {print $1}' ) ; then
15+ echo " error: could not determine hash for ${ARCHIVE } " >&2
1416 exit 1
1517fi
1618
1719cat << EOF
18- WORKSPACE snippet:
20+ ## Using bzlmod with Bazel 6
21+
22+ 1. Enable with \` common --enable_bzlmod\` in \` .bazelrc\` .
23+ 2. Add to your \` MODULE.bazel\` file:
24+
25+ \`\`\` starlark
26+ bazel_dep(name = "rules_haskell", version = "${TAG: 1} ")
27+ \`\`\`
28+
29+ ## Using WORKSPACE
30+
1931\`\`\` starlark
2032load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2133http_archive(
You can’t perform that action at this time.
0 commit comments