File tree Expand file tree Collapse file tree 2 files changed +22
-10
lines changed Expand file tree Collapse file tree 2 files changed +22
-10
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
17- - name : Generate changelog
18- run : |
19- printf '\n-----\n\n' >> release_notes.txt
20- awk -f .github/workflows/changelog.awk CHANGELOG.md >> release_notes.txt
2115 - name : Create archive
2216 id : archive
2317 run : |
2923 echo "tgz=${ARCHIVE}" >> $GITHUB_OUTPUT
3024
3125 git archive --format=tar.gz --prefix="${PREFIX}/" -o "$ARCHIVE" "${TAG}"
26+ - name : Prepare workspace snippet
27+ run : .github/workflows/workspace_snippet.sh ${{ steps.archive.outputs.tgz }} > release_notes.txt
28+ - name : Generate changelog
29+ run : |
30+ printf '\n-----\n\n' >> release_notes.txt
31+ awk -f .github/workflows/changelog.awk CHANGELOG.md >> release_notes.txt
3232 - name : Release
3333 uses : softprops/action-gh-release@v1
3434 with :
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