Skip to content

Commit ac5fdeb

Browse files
committed
ci: merge release and publish workflow
1 parent d54b8da commit ac5fdeb

File tree

2 files changed

+41
-59
lines changed

2 files changed

+41
-59
lines changed

.github/workflows/publish.yml

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

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,44 @@ jobs:
2929
run: npx -p @release-it/bumper -p @release-it/conventional-changelog release-it
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
- name: Upload artifacts for publication
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: python-dist
36+
path: dist/*
37+
test-pypi-publish:
38+
name: Upload to Test PyPI
39+
runs-on: ubuntu-latest
40+
needs: [release]
41+
environment:
42+
name: test-pypi
43+
url: https://test.pypi.org/p/pydantic-gitlab-webhooks
44+
permissions:
45+
id-token: write
46+
steps:
47+
- name: Download distribution artifacts
48+
uses: actions/download-artifact@v4
49+
with:
50+
name: python-dist
51+
path: dist/
52+
- name: Publish package distributions to PyPI
53+
uses: pypa/gh-action-pypi-publish@release/v1
54+
with:
55+
repository-url: https://test.pypi.org/legacy/
56+
pypi-publish:
57+
name: Upload to PyPI
58+
runs-on: ubuntu-latest
59+
needs: [test-pypi-publish]
60+
environment:
61+
name: pypi
62+
url: https://pypi.org/p/pydantic-gitlab-webhooks
63+
permissions:
64+
id-token: write
65+
steps:
66+
- name: Download a single artifact
67+
uses: actions/download-artifact@v4
68+
with:
69+
name: python-dist
70+
path: dist/
71+
- name: Publish package distributions to PyPI
72+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)