setup action to build/publish on PyPI
This commit is contained in:
parent
dcc73dfc81
commit
932965c8af
2 changed files with 19 additions and 4 deletions
28
.github/workflows/docker-hub.yml
vendored
Normal file
28
.github/workflows/docker-hub.yml
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
name: Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
docker-hub:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: docker/metadata-action@v3
|
||||
id: meta
|
||||
with:
|
||||
images: nim65s/matrix-webhook
|
||||
- uses: docker/login-action@v1
|
||||
with:
|
||||
username: nim65s
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
15
.github/workflows/pypi.yml
vendored
Normal file
15
.github/workflows/pypi.yml
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
name: PyPI
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
pypi:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: pip install -U poetry twine wheel
|
||||
- run: poetry build
|
||||
- run: twine upload --non-interactive -u __token__ -p ${{ secrets.PYPI_TOKEN }} dist/*
|
||||
Loading…
Reference in a new issue