Skip to content

Commit 9995ea3

Browse files
committed
publish artifacts
1 parent f0ee879 commit 9995ea3

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

.github/workflows/publish.yaml

+24-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
name: Publish
22

33
on:
4+
push:
5+
tags:
6+
- '*'
47
release:
5-
types: [published]
8+
types:
9+
- published
610

711
permissions:
812
contents: read
913

1014
jobs:
1115
deploy:
1216
runs-on: ubuntu-latest
13-
environment:
14-
name: pypi
15-
url: https://pypi.org/p/subliminal
16-
permissions:
17-
id-token: write
1817
steps:
1918
- uses: actions/checkout@v4
2019
- uses: actions/setup-python@v5
@@ -26,6 +25,25 @@ jobs:
2625
pip install build
2726
- name: Build package
2827
run: python -m build
28+
- uses: actions/upload-artifact@v4
29+
with:
30+
name: Packages
31+
path: dist/*
32+
33+
publish:
34+
needs: [deploy]
35+
environment:
36+
name: pypi
37+
url: https://pypi.org/p/subliminal
38+
permissions:
39+
id-token: write
40+
runs-on: ubuntu-latest
41+
if: github.event_name == 'release' && github.event.action == 'published'
42+
steps:
43+
- uses: actions/download-artifact@v4
44+
with:
45+
name: Packages
46+
path: dist
2947
- name: Publish package
3048
uses: pypa/gh-action-pypi-publish@release/v1
3149
with:

0 commit comments

Comments
 (0)