Skip to content

Commit 3cff245

Browse files
authored
Merge pull request #6 from TaskBeacon/codex/create-github-actions-publish-workflow
Add publish workflow
2 parents 9d01d99 + 961c059 commit 3cff245

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/workflows/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-publish:
10+
if: contains(github.event.head_commit.message, '[publish]')
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-python@v4
15+
with:
16+
python-version: '3.x'
17+
- run: pip install build
18+
- run: python -m build
19+
- uses: pypa/gh-action-pypi-publish@release/v1
20+
with:
21+
password: ${{ secrets.PYPI_API_TOKEN }}

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# psyflow
2+
3+
This repository hosts the **psyflow** package.
4+
5+
## Publishing to PyPI
6+
7+
Releases are automated with GitHub Actions. Any push to the `main` branch
8+
that contains `[publish]` in the commit message will trigger the
9+
[`publish`](.github/workflows/publish.yml) workflow. The workflow builds
10+
sdist and wheel via `python -m build` and uploads them to PyPI using the
11+
`pypa/gh-action-pypi-publish` action. The upload requires a
12+
`PYPI_API_TOKEN` secret configured in the repository.
13+
14+

0 commit comments

Comments
 (0)