Skip to content

Commit 25aa9e9

Browse files
committed
fix: publish to PyPI
1 parent 715c0fb commit 25aa9e9

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

.github/workflows/build-test-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ jobs:
7272
steps:
7373
- uses: actions/checkout@v2
7474
with:
75-
submodules: false
7675
# Very important: semantic-release won't trigger a tagged
7776
# build if this is not set false
7877
persist-credentials: false
@@ -102,6 +101,8 @@ jobs:
102101
@google/semantic-release-replace-plugin
103102
env:
104103
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_ADMIN }}
104+
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
105+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
105106

106107
update-semver:
107108
name: Move Respository semver tags

.github/workflows/sr-prepare.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
set -eE
4+
set -v
5+
# shellcheck disable=SC1091,SC2086
6+
source $HOME/.poetry/env
7+
poetry build

.github/workflows/sr-release.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
set -eE
4+
set -v
5+
source $HOME/.poetry/env
6+
echo pypy user=${PYPI_USERNAME}
7+
poetry publish -n -u ${PYPI_USERNAME} -p ${PYPI_TOKEN}

.releaserc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@
4444
}
4545
],
4646
"@semantic-release/release-notes-generator",
47+
[
48+
"@semantic-release/exec",
49+
{
50+
"prepareCmd": "./.github/workflows/sr-prepare.sh ${nextRelease.version}",
51+
"publishCmd": "./.github/workflows/sr-release.sh",
52+
"shell": "bash"
53+
},
54+
],
4755
[
4856
"@semantic-release/git",
4957
{

0 commit comments

Comments
 (0)