-
Notifications
You must be signed in to change notification settings - Fork 138
39 lines (32 loc) · 1016 Bytes
/
publish-pypi.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
name: release
on:
workflow_dispatch: null
release:
types: [ published ]
jobs:
pypi-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Update system packages
run: sudo apt-get update -y
- name: Install make
run: sudo apt-get install -y build-essential
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Python deps
run: pip install wheel
- name: Install package requirements
run: make requirements
- name: Build the package
run: make build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINODE_CLI_VERSION: ${{ github.event.release.tag_name }}
- name: Publish the release artifacts to PyPI
uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # pin@release/v1.12.2
with:
password: ${{ secrets.PYPI_API_TOKEN }}