-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.24 KB
/
package.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
name: Build and Release Python Wheel with Poetry
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11 # or the version you need
- name: Install Poetry
run: pip install poetry
- name: Install dependencies
run: poetry install
- name: Build wheel
run: poetry build
- name: Find package
id: find_pkg
run: |
package_file=$(ls dist/*.whl)
echo "package_file=${package_file}" >> $GITHUB_ENV
echo "tag_name=$(echo $GITHUB_REF | sed 's|refs/tags/||')" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: python_wheel
path: ${{ env.package_file }}
retention-days: 1
- name: Move to release
id: upload-artifact
uses: softprops/action-gh-release@v1
with:
files: ${{ env.package_file }}
tag_name: ${{ env.tag_name }}
name: Release ${{ env.tag_name }}
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: false