forked from speced/bikeshed
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (49 loc) · 1.29 KB
/
gh-release-create.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
name: gh release create
on:
workflow_dispatch:
inputs:
draft:
description: ""
type: boolean
default: false
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
pyinstaller:
uses: ./.github/workflows/pyinstaller.yml
get-version:
outputs:
version: ${{ steps.get-version.outputs.version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: get-version
run: |
version=$(cat bikeshed/semver.txt)
echo "version=$version" >> "$GITHUB_OUTPUT"
gh-release-create:
needs: [pyinstaller, get-version]
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- run: |
for f in *; do
pushd "$f"
if [[ $f == *win* ]]; then
zip -r "../$f.zip" .
else
tar -czf "../$f.tar.gz" .
fi
popd
rm -rf "$f"
done
- run: |
gh release create "v$VERSION" \
${{ (inputs.draft && '--draft') || '' }} \
--generate-notes \
./*
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
VERSION: ${{ needs.get-version.outputs.version }}