File tree 2 files changed +9
-4
lines changed 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,14 @@ jobs:
27
27
# Bazelisk will download bazel to here
28
28
XDG_CACHE_HOME : ~/.cache/bazel-repo
29
29
run : bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //...
30
- - name : Prepare workspace snippet
31
- run : .github/workflows/workspace_snippet .sh ${{ env.GITHUB_REF_NAME }} > release_notes.txt
30
+ - name : Prepare release
31
+ run : .github/workflows/release_prep .sh ${{ env.GITHUB_REF_NAME }} > release_notes.txt
32
32
- name : Release
33
33
uses : softprops/action-gh-release@v1
34
34
with :
35
35
prerelease : true
36
36
# Use GH feature to populate the changelog automatically
37
37
generate_release_notes : true
38
38
body_path : release_notes.txt
39
+ files : rules_oci-*.tar.gz
40
+ fail_on_unmatched_files : true
Original file line number Diff line number Diff line change @@ -5,8 +5,11 @@ set -o errexit -o nounset -o pipefail
5
5
# Set by GH actions, see
6
6
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
7
7
TAG=${GITHUB_REF_NAME}
8
+ # The prefix is chosen to match what GitHub generates for source archives
8
9
PREFIX=" rules_oci-${TAG: 1} "
9
- SHA=$( git archive --format=tar --prefix=${PREFIX} / ${TAG} | gzip | shasum -a 256 | awk ' {print $1}' )
10
+ ARCHIVE=" rules_oci-$TAG .tar.gz"
11
+ git archive --format=tar --prefix=${PREFIX} / ${TAG} | gzip > $ARCHIVE
12
+ SHA=$( shasum -a 256 $ARCHIVE | awk ' {print $1}' )
10
13
11
14
cat << EOF
12
15
WORKSPACE snippet:
@@ -16,7 +19,7 @@ http_archive(
16
19
name = "contrib_rules_oci",
17
20
sha256 = "${SHA} ",
18
21
strip_prefix = "${PREFIX} ",
19
- url = "https://github.com/bazel-contrib/rules_oci/archive/ ${TAG} .tar.gz ",
22
+ url = "https://github.com/bazel-contrib/rules_oci/releases/download/ ${TAG} / ${ARCHIVE} ",
20
23
)
21
24
22
25
# Fetches the rules_oci dependencies.
You can’t perform that action at this time.
0 commit comments