-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (35 loc) · 963 Bytes
/
release.yaml
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
name: Release to PyPI
on:
release:
types: [published, edited]
jobs:
pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: extractions/setup-just@v1
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
- run: poetry config pypi-token.pypi "${{ secrets.PYPI_API_KEY }}"
- name: install twine
run: |
pip install twine
- name: download release
run: |
tag='${{ github.ref }}'
tag="${tag/refs\/tags\//}"
mkdir dist
cd dist
gh release download "$tag" -p 'extism-*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: upload release
run: |
twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}