-
-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (40 loc) · 1.14 KB
/
release.yaml
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
name: Release
permissions:
id-token: write
contents: write
on:
release:
types:
- published
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Build
env:
VERSION: ${{ github.event.release.tag_name }}
run: make
- name: Upload to GitHub release assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_URL: ${{ github.event.release.upload_url }}
VERSION: ${{ github.event.release.tag_name }}
run: |
set +e
for variant in firefox chrome; do
name="mergify-${variant}-${VERSION}.zip"
curl -L \
--fail \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Content-Type: application/octet-stream" \
--data-binary "@${name}" \
"${UPLOAD_URL%%/assets*}/assets?name=${name}"
if [ $? = 22 ]; then
echo "Upload of $name failed"
exit 22
fi
done
set -e