-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.03 KB
/
release.yml
File metadata and controls
53 lines (44 loc) · 1.03 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
name: Create Release
on:
workflow_dispatch:
inputs:
tag_name:
required: true
type: string
release:
description: "Whether to create a GitHub Release"
type: boolean
default: true
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup venv
run: |
python -m venv .venv
. .venv/bin/activate
python -m pip install build
- name: Build
run: |
. .venv/bin/activate
python -m build
- name: Create Release
shell: bash
env:
TAG_NAME: ${{ inputs.tag_name }}
GH_TOKEN: ${{ github.token }}
run: |
release_args=(
"$TAG_NAME"
--title "${TAG_NAME}"
--target "$GITHUB_SHA"
--generate-notes
)
# check for e.g., v1.1.0-rc0
if [[ $TAG_NAME == *-* ]]; then
release_args+=( --prerelease )
fi
gh release create "${release_args[@]}" dist/*.whl