-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.19 KB
/
publish.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
name: Build and Upload Release Asset
on:
push:
tags:
- 'v*.*.*'
jobs:
build-and-upload:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install `uv`
run: |
python -m pip install --upgrade pip
pip install uv # Install `uv` for building
- name: Build the package with `uv`
run: uv build
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: softprops/action-gh-release@v2
with:
files: dist/* # Path to built assets
draft: false # Mark as published (set true if draft is needed)
prerelease: false # Mark as prerelease if applicable
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}