-
-
Notifications
You must be signed in to change notification settings - Fork 0
25 lines (25 loc) · 700 Bytes
/
release.yml
File metadata and controls
25 lines (25 loc) · 700 Bytes
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
name: Release
on:
push:
tags: ["v*"]
workflow_dispatch:
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with: { python-version: "3.11" }
- name: Build
run: |
pip install build
python -m build
- name: Upload
env:
GH_TOKEN: "${{ github.token }}"
run: |
tag="${{ github.ref_name }}"; if [[ -z "$tag" || "$tag" == "main" ]]; then tag="v0.1.2"; fi
gh release upload "$tag" dist/* --clobber || gh release create "$tag" dist/* --title "Release $tag" --generate-notes