Skip to content

Commit 494ea5e

Browse files
committed
Improve gh workflows
1 parent eea8e00 commit 494ea5e

File tree

4 files changed

+40
-65
lines changed

4 files changed

+40
-65
lines changed

.github/workflows/build-dist.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/python-publish.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [ published ]
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
build:
10+
name: Build distribution
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: 3.12
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install build
23+
- name: Build source distribution
24+
run: python -m build .
25+
26+
pypi-publish:
27+
name: Upload release to PyPI
28+
runs-on: ubuntu-latest
29+
environment:
30+
name: pypi
31+
url: https://pypi.org/p/shelloracle
32+
permissions:
33+
id-token: write
34+
steps:
35+
- name: Publish package distributions to PyPI
36+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/run-tests.yml renamed to .github/workflows/tests.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
name: Run Tests
1+
name: Tests
22
on:
33
push:
44
pull_request:
5-
65
concurrency:
76
group: test-${{ github.ref }}
87
cancel-in-progress: true
8+
permissions:
9+
contents: read
910

1011
jobs:
1112
test:
12-
name: test with ${{ matrix.py }}
13+
name: Test with ${{ matrix.py }}
1314
runs-on: ubuntu-latest
1415
strategy:
1516
fail-fast: false

0 commit comments

Comments
 (0)