-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.37 KB
/
build.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: Build Wheels
on:
push:
tags:
- 'v*.*.*'
env:
PYTHON_VERSION: 3.9.18
POETRY_VERSION: 1.6.1
jobs:
wheel:
name: Build Wheels
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: abatilo/actions-poetry@v2
with:
poetry-version: ${{ env.POETRY_VERSION }}
- name: Build Dependencies Wheels
run: python -m pip wheel -w dist .
- name: Build Package Wheel
run: |
acacore="$(grep 'acacore =' pyproject.toml | grep -oE 'tag[ ]*=[ ]*"[^"]+"')"
acacore="${acacore#*\"}"
acacore="${acacore#v}"
acacore="${acacore%\"}"
sed -ie "s/acacore *=.*/acacore = \"$acacore\"/g" pyproject.toml
poetry build
- name: Get Tag
id: tag
run: echo "tag=$(git tag -l --sort=-version:refname | head -1)" >> "$GITHUB_OUTPUT"
- name: Create Wheels ZIP
run: zip -j wheels.zip dist/*.whl
- name: Create Release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ steps.tag.outputs.tag }}
name: ${{ steps.tag.outputs.tag }}
files: |
dist/*
wheels.zip