-
Notifications
You must be signed in to change notification settings - Fork 46
43 lines (39 loc) · 1.06 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Publish
on:
create:
tags:
- v*
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
actions: read
checks: write
issues: read
packages: write
pull-requests: read
repository-projects: read
statuses: read
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Load cached $HOME/.local
uses: actions/cache@v3
with:
path: ~/.local
key: dotlocal-${{ runner.os }}-${{ hashFiles('.github/workflows/publish.yml') }}
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Build and publish
run: |
poetry publish --build --username ${{ secrets.PYPI_USERNAME }} --password ${{ secrets.PYPI_PASSWORD }}
- name: Upload Release Assets
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_paths: '["dist/reportbro_lib-*.whl", "dist/reportbro-lib-*.tar.gz"]'