-
-
Notifications
You must be signed in to change notification settings - Fork 301
Expand file tree
/
Copy pathpypi-release-aboutcode-hashid.yml
More file actions
40 lines (32 loc) · 1.18 KB
/
pypi-release-aboutcode-hashid.yml
File metadata and controls
40 lines (32 loc) · 1.18 KB
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
name: Build aboutcode.hashid Python distributions and publish on PyPI
on:
workflow_dispatch:
push:
tags:
- "aboutcode.hashid/*"
jobs:
build-and-publish:
name: Build and publish library to PyPI
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.11
- name: Install flot
run: python -m pip install flot --user
- name: Build binary wheel and source tarball
run: python -m flot --pyproject pyproject-aboutcode.hashid.toml --sdist --wheel --output-dir dist/
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
with:
password: ${{ secrets.PYPI_API_TOKEN_ABOUTCODE_HASHID }}
- name: Upload built archives
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: pypi_archives
path: dist/*