Skip to content

Commit 4f49ea1

Browse files
create pypi-publish.yml
1 parent edcfae3 commit 4f49ea1

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: PyPi Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
release-build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.x"
20+
21+
pypi-publish:
22+
runs-on: ubuntu-latest
23+
needs:
24+
- release-build
25+
permissions:
26+
id-token: write
27+
28+
# Dedicated environments with protections for publishing are strongly recommended.
29+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
30+
environment:
31+
name: pypi
32+
url: https://pypi.org/project/pygments-gdscript/${{ github.event.release.name }}
33+
34+
steps:
35+
- name: Retrieve release distributions
36+
uses: actions/download-artifact@v4
37+
with:
38+
name: release-dists
39+
path: dist/
40+
41+
- name: Publish release distributions to PyPI
42+
uses: pypa/gh-action-pypi-publish@release/v1
43+
with:
44+
packages-dir: dist/

0 commit comments

Comments
 (0)