Skip to content

Commit a457a86

Browse files
authored
Merge pull request #1679 from ocefpaf/pypi_and_dependabot
update PyPI GHA and add dependabot.yml
2 parents 2e0b4f6 + 5dbcb6e commit a457a86

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

.github/dependabot.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# See https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot
2+
3+
version: 2
4+
updates:
5+
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
interval: "daily"
10+
labels:
11+
- "Bot"

.github/workflows/pypi.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: Publish to PyPI
22

3-
on: ["push", "pull_request"]
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
release:
9+
types:
10+
- published
411

512
defaults:
613
run:
@@ -15,7 +22,7 @@ jobs:
1522
- name: Set up Python
1623
uses: actions/setup-python@v4
1724
with:
18-
python-version: 3.x
25+
python-version: "3.x"
1926

2027
- name: Get tags
2128
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
@@ -38,7 +45,7 @@ jobs:
3845
python -m twine check *
3946
4047
- name: Publish a Python distribution to PyPI
41-
if: ${{ github.event_name == 'release' }}
48+
if: success() && github.event_name == 'release'
4249
uses: pypa/[email protected]
4350
with:
4451
user: __token__

0 commit comments

Comments
 (0)