-
Notifications
You must be signed in to change notification settings - Fork 411
Expand file tree
/
Copy pathrate-limits-backend-release.yml
More file actions
110 lines (82 loc) · 2.81 KB
/
Copy pathrate-limits-backend-release.yml
File metadata and controls
110 lines (82 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: rate-limits-release
on:
workflow_dispatch:
inputs:
title:
description: 'Title for the release'
required: true
type: string
description:
description: 'Human-readable description of the release'
required: true
type: string
permissions:
contents: write
env:
NAME: rate-limits
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
defaults:
run:
shell: bash
jobs:
build-and-release:
name: Build and release the rate-limits backend canister
runs-on:
labels: dind-large
container:
image: ghcr.io/dfinity/ic-build@sha256:0b6a915e614105c632a0c7a0f6e530ed506decfbd0316b297b28e9c555c532a2
options: >-
-e NODE_NAME --privileged --cgroupns host -v /var/tmp:/var/tmp -v /ceph-s3-info:/ceph-s3-info --mount type=tmpfs,target="/tmp/containers"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: build
run: |
TARGET='//rs/boundary_node/rate_limits:rate_limit_canister'
bazel build ${TARGET}
OUTPUT='bazel-bin/rs/boundary_node/rate_limits/rate_limit_canister.wasm.gz'
mv ${OUTPUT} rate_limit_canister.wasm.gz
- name: artifacts
run: |
ARTIFACTS=(
rate_limit_canister.wasm.gz
)
echo "ARTIFACTS<<EOF" >> $GITHUB_ENV
for ARTIFACT in ${ARTIFACTS[@]}; do echo ${ARTIFACT} >> $GITHUB_ENV; done
echo "EOF" >> $GITHUB_ENV
- name: checksums
run: |
CHECKSUMS=$(mktemp)
for ARTIFACT in ${ARTIFACTS}; do
shasum -a256 ${ARTIFACT} >> ${CHECKSUMS}
done
echo "CHECKSUMS=${CHECKSUMS}" >> "${GITHUB_ENV}"
- name: tag
run: |
COMMIT_SHORT=$(git rev-parse --short HEAD)
RELEASE_TAG="${{ env.NAME }}-${COMMIT_SHORT}"
echo "RELEASE_TAG=${RELEASE_TAG}" >> "${GITHUB_ENV}"
- name: release notes
run: |
NOTES=$(mktemp)
CODE_BLOCK='```'
cat > ${NOTES} <<EOF
${{ inputs.description }}
## Verification
To reproduce the artifacts of this release:
${CODE_BLOCK}
bazel build --config=local //rs/boundary_node/rate_limits:rate_limit_canister
${CODE_BLOCK}
## Checksums
${CODE_BLOCK}
$(cat ${CHECKSUMS})
${CODE_BLOCK}
EOF
echo "NOTES=${NOTES}" >> "${GITHUB_ENV}"
- name: release
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8
with:
tag_name: ${{ env.RELEASE_TAG }}
name: ${{ inputs.title }}
make_latest: false
body_path: ${{ env.NOTES }}
files: ${{ env.ARTIFACTS }}