Skip to content

Commit d67bb96

Browse files
authored
Merge pull request #184 from lucasimi/develop
Split workflows
2 parents 2fc06c2 + 334729a commit d67bb96

File tree

2 files changed

+42
-8
lines changed

2 files changed

+42
-8
lines changed

.github/workflows/publish-test.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: publish-test
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
8+
jobs:
9+
publish-test:
10+
name: Publish
11+
runs-on: ubuntu-latest
12+
environment: pypi
13+
permissions:
14+
id-token: write
15+
steps:
16+
- name: Check out code
17+
uses: actions/checkout@v4
18+
19+
- name: Install Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.10'
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install twine build
27+
python -m pip install -e .
28+
29+
- name: Build package
30+
run: |
31+
python -m build
32+
python -m twine check dist/*
33+
34+
- name: Publish to TestPyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1
36+
with:
37+
repository-url: https://test.pypi.org/legacy/

.github/workflows/publish.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: publish
22

33
on:
4-
push:
5-
tags:
6-
- 'v[0-9]+.[0-9]+.[0-9]+'
4+
published:
5+
workflows: ["publish-test"]
6+
types:
7+
- completed
8+
status: success
79

810
jobs:
911
publish:
@@ -31,10 +33,5 @@ jobs:
3133
python -m build
3234
python -m twine check dist/*
3335
34-
- name: Publish to TestPyPI
35-
uses: pypa/gh-action-pypi-publish@release/v1
36-
with:
37-
repository-url: https://test.pypi.org/legacy/
38-
3936
- name: Publish to PyPI
4037
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)