forked from speced/bikeshed
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (64 loc) · 2.28 KB
/
release.yml
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
name: Create release
on:
workflow_dispatch:
inputs:
draft:
type: boolean
jobs:
build:
uses: ./.github/workflows/ci.yml
version:
outputs:
version: ${{ steps.version.outputs.version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: version
run: |
version=$(cat bikeshed/semver.txt)
echo "version=$version" >> "$GITHUB_OUTPUT"
gh-release-create:
needs: [build, version]
permissions:
contents: write
runs-on: ubuntu-latest
env:
version: ${{ needs.version.outputs.version }}
steps:
- uses: actions/download-artifact@v4
with:
name: bikeshed-linux_x86_64
- uses: actions/download-artifact@v4
with:
name: bikeshed-macosx_10_9_x86_64
- uses: actions/download-artifact@v4
with:
name: bikeshed-macosx_11_0_arm64
- uses: actions/download-artifact@v4
with:
name: bikeshed-win_amd64
- uses: actions/download-artifact@v4
with:
name: bikeshed-ape
# https://github.com/actions/upload-artifact/issues/38
- run: chmod +x bikeshed-linux_x86_64-$version/bikeshed
- run: chmod +x bikeshed-macosx_10_9_x86_64-$version/bikeshed
- run: chmod +x bikeshed-macosx_11_0_arm64-$version/bikeshed
- run: chmod +x bikeshed-ape-$version/bikeshed
- run: tar czf bikeshed-linux_x86_64-$version.tar.gz bikeshed-linux_x86_64-$version
- run: tar czf bikeshed-macosx_10_9_x86_64-$version.tar.gz bikeshed-macosx_10_9_x86_64-$version
- run: tar czf bikeshed-macosx_11_0_arm64-$version.tar.gz bikeshed-macosx_11_0_arm64-$version
- run: zip -r bikeshed-win_amd64-$version.zip bikeshed-win_amd64-$version
- run: zip -r bikeshed-ape-$version.zip bikeshed-ape-$version
- env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
gh release create "v$version" \
${{ (inputs.draft && '--draft') || '' }} \
--generate-notes \
bikeshed-linux_x86_64-$version.tar.gz \
bikeshed-macosx_10_9_x86_64-$version.tar.gz \
bikeshed-macosx_11_0_arm64-$version.tar.gz \
bikeshed-win_amd64-$version.zip \
bikeshed-ape-$version.zip