Skip to content

Commit 74ba22a

Browse files
authored
Merge pull request #66 from marksweb/feat/workflow-fetch-all
Checkout all history and tags in pypi workflows
2 parents 69b4838 + 9698a56 commit 74ba22a

File tree

2 files changed

+55
-51
lines changed

2 files changed

+55
-51
lines changed

.github/workflows/publish-to-live-pypi.yml

+27-25
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,32 @@ jobs:
1111
runs-on: ubuntu-latest
1212
environment: pypi
1313
steps:
14-
- uses: actions/checkout@master
15-
- name: Set up Python 3.9
16-
uses: actions/setup-python@v1
17-
with:
18-
python-version: 3.9
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
- name: Set up Python 3.9
18+
uses: actions/setup-python@v3
19+
with:
20+
python-version: 3.9
1921

20-
- name: Install pypa/build
21-
run: >-
22-
python -m
23-
pip install
24-
build
25-
--user
26-
- name: Build a binary wheel and a source tarball
27-
run: >-
28-
python -m
29-
build
30-
--sdist
31-
--wheel
32-
--outdir dist/
33-
.
22+
- name: Install pypa/build
23+
run: >-
24+
python -m
25+
pip install
26+
build
27+
--user
28+
- name: Build a binary wheel and a source tarball
29+
run: >-
30+
python -m
31+
build
32+
--sdist
33+
--wheel
34+
--outdir dist/
35+
.
3436
35-
- name: Publish distribution 📦 to PyPI
36-
if: startsWith(github.ref, 'refs/tags')
37-
uses: pypa/gh-action-pypi-publish@master
38-
with:
39-
user: __token__
40-
password: ${{ secrets.PYPI_API_TOKEN }}
37+
- name: Publish distribution 📦 to PyPI
38+
if: startsWith(github.ref, 'refs/tags')
39+
uses: pypa/gh-action-pypi-publish@master
40+
with:
41+
user: __token__
42+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/publish-to-test-pypi.yml

+28-26
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,33 @@ jobs:
1111
environment: pypi-test
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@master
15-
- name: Set up Python 3.9
16-
uses: actions/setup-python@v1
17-
with:
18-
python-version: 3.9
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
- name: Set up Python 3.9
18+
uses: actions/setup-python@v3
19+
with:
20+
python-version: 3.9
1921

20-
- name: Install pypa/build
21-
run: >-
22-
python -m
23-
pip install
24-
build
25-
--user
26-
- name: Build a binary wheel and a source tarball
27-
run: >-
28-
python -m
29-
build
30-
--sdist
31-
--wheel
32-
--outdir dist/
33-
.
22+
- name: Install pypa/build
23+
run: >-
24+
python -m
25+
pip install
26+
build
27+
--user
28+
- name: Build a binary wheel and a source tarball
29+
run: >-
30+
python -m
31+
build
32+
--sdist
33+
--wheel
34+
--outdir dist/
35+
.
3436
35-
- name: Publish distribution 📦 to Test PyPI
36-
uses: pypa/gh-action-pypi-publish@master
37-
with:
38-
user: __token__
39-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
40-
repository_url: https://test.pypi.org/legacy/
41-
skip_existing: true
37+
- name: Publish distribution 📦 to Test PyPI
38+
uses: pypa/gh-action-pypi-publish@master
39+
with:
40+
user: __token__
41+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
42+
repository_url: https://test.pypi.org/legacy/
43+
skip_existing: true

0 commit comments

Comments
 (0)