Skip to content

Commit 6861d23

Browse files
Merge pull request #1514 from allmightyspiff/test-pypi
Updates to the Release workflow for publishing to test pypi
2 parents 9fe27ca + 198937a commit 6861d23

File tree

2 files changed

+34
-6
lines changed

2 files changed

+34
-6
lines changed

.github/workflows/release.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Release Snapcraft and PyPi (Testing)
22

33
on:
44
release:
@@ -20,4 +20,32 @@ jobs:
2020
VERSION=`snapcraft list-revisions slcli --arch ${{ matrix.arch }} | grep "edge\*" | awk '{print $1}'`
2121
echo Publishing $VERSION on ${{ matrix.arch }}
2222
snapcraft release slcli $VERSION stable
23+
build-n-publish:
24+
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@master
28+
- name: Set up Python 3.8
29+
uses: actions/setup-python@v2
30+
with:
31+
python-version: 3.8
32+
- name: Install pypa/build
33+
run: >-
34+
python -m
35+
pip install
36+
build
37+
--user
38+
- name: Build a binary wheel and a source tarball
39+
run: >-
40+
python -m
41+
build
42+
--sdist
43+
--wheel
44+
--outdir dist/
45+
.
46+
- name: Publish 📦 to Test PyPI
47+
uses: pypa/gh-action-pypi-publish@master
48+
with:
49+
password: ${{ secrets.CGALLO_TEST_PYPI }}
50+
repository_url: https://test.pypi.org/legacy/
2351

.github/workflows/test_pypi_release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ name: Publish 📦 to TestPyPI
44

55
on:
66
push:
7-
branches: [ test-pypi ]
7+
branches: [test-pypi ]
88

99
jobs:
1010
build-n-publish:
1111
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
12-
runs-on: ubuntu-18.04
12+
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@master
15-
- name: Set up Python 3.7
16-
uses: actions/setup-python@v1
15+
- name: Set up Python 3.8
16+
uses: actions/setup-python@v2
1717
with:
18-
python-version: 3.7
18+
python-version: 3.8
1919
- name: Install pypa/build
2020
run: >-
2121
python -m

0 commit comments

Comments
 (0)