-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (34 loc) · 1.15 KB
/
publish-worker.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
name: Publish icij-worker
on:
push:
tags:
- icij-worker-*
jobs:
publish-icij-worker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Setup Python project
uses: actions/setup-python@v5
with:
python-version: 3.10
cache: poetry
- name: Install Python project
run: cd icij-worker && poetry install --with dev --sync
# We assume tests have run in a previous workflow and just build and publish
- name: Build and publish
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN_ICIJ_WORKER }}
# PyPi doesn't support orgs and user API token have to be put in here. Since tokens can be used either for a
# single repo or all user repos, we have to use separate tokens for each asset to avoid providing access to
# all user repos
run: |
cd icij-worker
poetry build
poetry config pypi-token.pypi ${{ env.PYPI_API_TOKEN }}
poetry publish
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false