Skip to content

Commit 8104e41

Browse files
committed
Fix releasing
1 parent 5f5c742 commit 8104e41

2 files changed

Lines changed: 35 additions & 26 deletions

File tree

.github/workflows/release.yml

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,41 @@ on:
44
workflow_dispatch:
55

66
jobs:
7-
# Build Python package
8-
build:
9-
uses: ewoks-kit/.github/.github/workflows/python-build.yml@main
7+
# Build and Test
8+
build-and-test:
9+
uses: ./.github/workflows/python-build.yml@main
1010

11-
# Run tests
12-
tests:
13-
needs: build
14-
uses: ewoks-kit/.github/.github/workflows/python-tests.yml@main
11+
# Publish package to TestPyPI
12+
publish-testpypi:
13+
needs: build-and-test
14+
runs-on: ubuntu-latest
15+
environment:
16+
name: release
17+
permissions:
18+
id-token: write
19+
steps:
20+
- uses: ewoks-kit/.github/.github/actions/setup-python-package@main
21+
- uses: pypa/gh-action-pypi-publish@release/v1
22+
with:
23+
repository-url: https://test.pypi.org/legacy/
1524

16-
# Run linter / checks
17-
checks:
18-
uses: ewoks-kit/.github/.github/workflows/python-check.yml@main
25+
# Publish package to PyPI
26+
publish-pypi:
27+
needs: build-and-test
28+
runs-on: ubuntu-latest
29+
environment:
30+
name: release
31+
permissions:
32+
id-token: write
33+
steps:
34+
- uses: ewoks-kit/.github/.github/actions/setup-python-package@main
35+
- uses: pypa/gh-action-pypi-publish@release/v1
1936

20-
# Build documentation
21-
docs:
22-
needs: build
23-
uses: ewoks-kit/.github/.github/workflows/python-docs.yml@main
24-
25-
# Publish package
26-
publish:
27-
uses: ewoks-kit/.github/.github/workflows/python-publish.yml@main
28-
needs:
29-
- tests
30-
- checks
31-
- docs
32-
with:
33-
twine-username: "__token__"
34-
twine-password: ${{ secrets.PYPI_TOKEN }}
35-
test-twine-password: ${{ secrets.TEST_PYPI_TOKEN }}
37+
# Tag
38+
tag-release:
39+
needs: publish-pypi
40+
runs-on: ubuntu-latest
41+
permissions:
42+
contents: write
43+
steps:
44+
- uses: ewoks-kit/.github/.github/actions/tag-release@main

0 commit comments

Comments
 (0)