Skip to content

Commit

Permalink
Merge pull request #1679 from ocefpaf/pypi_and_dependabot
Browse files Browse the repository at this point in the history
update PyPI GHA and add dependabot.yml
  • Loading branch information
ocefpaf authored Dec 12, 2022
2 parents 2e0b4f6 + 5dbcb6e commit a457a86
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# See https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels:
- "Bot"
13 changes: 10 additions & 3 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Publish to PyPI

on: ["push", "pull_request"]
on:
pull_request:
push:
branches:
- main
release:
types:
- published

defaults:
run:
Expand All @@ -15,7 +22,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
python-version: "3.x"

- name: Get tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
Expand All @@ -38,7 +45,7 @@ jobs:
python -m twine check *
- name: Publish a Python distribution to PyPI
if: ${{ github.event_name == 'release' }}
if: success() && github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@v1.5.1
with:
user: __token__
Expand Down

0 comments on commit a457a86

Please sign in to comment.