Skip to content

Commit 8850161

Browse files
committed
add release workflow
1 parent ed48b5d commit 8850161

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
8+
jobs:
9+
tests:
10+
uses: ./.github/workflows/tox.yml
11+
12+
pypi-publish:
13+
needs: tests
14+
permissions:
15+
id-token: write
16+
environment:
17+
name: pypi
18+
url: https://pypi.org/p/stagpy
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: '0'
24+
- uses: actions/setup-python@v5
25+
with:
26+
python-version: 3.12
27+
- run: python3 -m pip install -U pip
28+
- run: python3 -m pip install build
29+
- run: python3 -m build
30+
- uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/tox.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ on:
66
pull_request:
77
branches: [ master ]
88

9-
# Allows you to run this workflow manually from the Actions tab
109
workflow_dispatch:
1110

11+
workflow_call:
12+
1213
jobs:
1314
build:
1415
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)