Skip to content

Commit ca5b2cb

Browse files
committed
ci: Limit publish workflow to pushes on main and tags
Signed-off-by: Nick Diego Yamane <[email protected]>
1 parent dc6d562 commit ca5b2cb

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
name: Publish to PyPI and TestPyPI
22

3-
on: push
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- '*'
49

510
jobs:
611
build:
712
name: Build
813
runs-on: ubuntu-latest
9-
1014
steps:
1115
- uses: actions/checkout@v4
1216
with:
@@ -36,7 +40,6 @@ jobs:
3640
url: https://pypi.org/p/compiledb
3741
permissions:
3842
id-token: write
39-
4043
steps:
4144
- name: Download all the dists
4245
uses: actions/download-artifact@v4
@@ -51,11 +54,9 @@ jobs:
5154
needs:
5255
- publish-to-pypi
5356
runs-on: ubuntu-latest
54-
5557
permissions:
5658
contents: write
5759
id-token: write
58-
5960
steps:
6061
- name: Download all the dists
6162
uses: actions/download-artifact@v4
@@ -93,14 +94,11 @@ jobs:
9394
needs:
9495
- build
9596
runs-on: ubuntu-latest
96-
9797
environment:
9898
name: testpypi
9999
url: https://test.pypi.org/p/compiledb
100-
101100
permissions:
102101
id-token: write
103-
104102
steps:
105103
- name: Download all the dists
106104
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)