Skip to content

Commit 61146c1

Browse files
--amend
1 parent 148a9a1 commit 61146c1

File tree

2 files changed

+35
-14
lines changed

2 files changed

+35
-14
lines changed

.github/workflows/python-package.yml renamed to .github/workflows/ci.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ name: Python Package
22

33
on:
44
push:
5-
tags: [ '*' ]
6-
branches: [ "main" ]
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
78

89
jobs:
910
build:
@@ -24,15 +25,3 @@ jobs:
2425
- name: Test with doctest
2526
run: |
2627
python -m doctest -v shinny_calendar/*
27-
28-
- name: Build package
29-
run: |
30-
pip install build
31-
python -m build
32-
33-
- name: Publish to Pypi
34-
if: startsWith(github.event.ref, 'refs/tags')
35-
uses: pypa/gh-action-pypi-publish@master
36-
with:
37-
user: __token__
38-
password: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/pypi-upload.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish Python Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
pypi-publish:
9+
name: Upload release to PyPI
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
13+
14+
steps:
15+
- name: Checkout source
16+
uses: actions/checkout@v3
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: "3.10"
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install build
27+
28+
- name: Build package
29+
run: python -m build
30+
31+
- name: Publish package distributions to PyPI
32+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)