Skip to content

Commit 14a8f0b

Browse files
author
Justin Poehnelt
authored
chore: run publish in release exec (#401)
1 parent dfd09e6 commit 14a8f0b

4 files changed

Lines changed: 20 additions & 51 deletions

File tree

.github/scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if ! python3 -m pip --version; then
66
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
77
sudo python3 get-pip.py
88
sudo python3 -m pip install --upgrade setuptools
9-
sudo python3 -m pip install nox
9+
sudo python3 -m pip install nox twine
1010
else
1111
sudo python3 -m pip install --upgrade setuptools
1212
python3 -m pip install nox

.github/workflows/publish.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,18 @@ jobs:
2020
release:
2121
runs-on: ubuntu-latest
2222
steps:
23+
- name: Setup Python
24+
uses: "actions/setup-python@v1"
25+
with:
26+
python-version: "3.6"
2327
- name: Checkout
2428
uses: actions/checkout@v2
2529
with:
2630
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
31+
- name: Install dependencies
32+
run: ./.github/scripts/install.sh
33+
- name: Run distribution
34+
run: python3 -m nox -e distribution
2735
- name: Semantic Release
2836
uses: cycjimmy/semantic-release-action@v2
2937
with:
@@ -35,3 +43,5 @@ jobs:
3543
"@semantic-release/github
3644
env:
3745
GH_TOKEN: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
46+
TWINE_USERNAME: __token__
47+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

.releaserc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,15 @@ plugins:
1111
to: "__version__ = \"${nextRelease.version}\""
1212
- files:
1313
- "./setup.py"
14-
from: "version=\".*\""
15-
to: "version=\"${nextRelease.version}\""
14+
from: 'version=".*"'
15+
to: 'version="${nextRelease.version}"'
16+
- - "@semantic-release/exec"
17+
- prepareCmd:
18+
- rm -rf dist
19+
- python3 setup.py sdist
20+
- python3 -m twine check dist/*
21+
- publishCmd:
22+
- python3 -m twine upload dist/*
1623
- - "@semantic-release/git"
1724
- assets:
1825
- "./googlemaps/__init__.py"

0 commit comments

Comments
 (0)