Skip to content

Commit a48d5fc

Browse files
Merge pull request #29 from oseasandrepro/workflow-improvements
Workflow improvements
2 parents 36fd7f6 + 6058f6a commit a48d5fc

2 files changed

Lines changed: 52 additions & 2 deletions

File tree

.github/workflows/build.yaml renamed to .github/workflows/ continuous-integration.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Test [Python 3.13]
1+
name: Continuous Integration [Python 3.13]
22

33
on: push
44
jobs:
@@ -8,7 +8,9 @@ jobs:
88
matrix:
99
python-version: [3.13]
1010
steps:
11-
- uses: actions/checkout@v2
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
1214
- name: Set up Python ${{ matrix.python-version }}
1315
uses: actions/setup-python@v2
1416
with:

.github/workflows/release.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and Release [Python 3.13]
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-release:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: [3.13]
14+
15+
permissions:
16+
contents: write
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install build tool
28+
run: pip install build
29+
30+
- name: Build package
31+
run: python -m build
32+
33+
- name: Extract version from pyproject.toml
34+
id: get_version
35+
run: |
36+
VERSION=$(grep '^version' pyproject.toml | head -1 | cut -d '"' -f2)
37+
echo "version=$VERSION" >> $GITHUB_OUTPUT
38+
39+
- name: Create GitHub Release
40+
uses: softprops/action-gh-release@v2
41+
with:
42+
tag_name: v${{ steps.get_version.outputs.version }}
43+
name: v${{ steps.get_version.outputs.version }}
44+
draft: false
45+
prerelease: false
46+
files: |
47+
dist/*.whl
48+
dist/*.tar.gz

0 commit comments

Comments
 (0)