Skip to content

Commit 1676af2

Browse files
committed
ci(github): complete prototype of semantic-release configuration
1 parent 0edf192 commit 1676af2

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/actions/setup-semantic-release/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: setup semantic-release with plugins
22
runs:
3+
using: composite
4+
steps:
35
- uses: actions/setup_node@v5
46
id: setup_node
57
- uses: actions/cache@v4

.github/workflows/main.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,20 @@ jobs:
6262
env:
6363
SMOKETEST_DOCKER_IMAGE: python:${{ steps.setup.outputs.python-version }}
6464
release:
65-
#if: github.ref == 'refs/heads/master'
65+
if: ( github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/ci/') )
6666
#needs: ['smoketest','lint','test']
6767
runs-on: ubuntu-latest
6868
steps:
6969
- uses: actions/checkout@v5
7070
- uses: ./.github/actions/setup-semantic-release
7171
- run: semantic-release
72+
env:
73+
GIT_AUTHOR_NAME: appland-release
74+
GIT_AUTHOR_EMAIL: release@app.land
75+
GIT_COMMITTER_NAME: appland-release
76+
GIT_COMMITTER_EMAIL: release@app.land
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
PYPI_PUBLISH_REPO: ${{ github.ref == 'refs/heads/master' && 'pypi' || 'testpypi' }}
79+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }}
80+
POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.POETRY_PYPI_TOKEN_TESTPYPI }}
81+
POETRY_REPOSITORIES_TESTPYPI: https://test.pypi.org/legacy/

.releaserc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ plugins:
1818
- CHANGELOG.md
1919
- pyproject.toml
2020
- - '@semantic-release/exec'
21-
- publishCmd: poetry publish --build
21+
- publishCmd: poetry publish --build -r ${PYPI_PUBLISH_REPO:-pypi}

0 commit comments

Comments
 (0)