Skip to content

Commit 9910bef

Browse files
authored
Merge pull request #1615 from aboutcode-org/hashid-gh-action
Add GitHub action to publish aboutcode.hashid PyPI
2 parents 5ed6f1c + 2d33540 commit 9910bef

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build aboutcode.hashid Python distributions and publish on PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- "aboutcode.hashid/*"
8+
9+
jobs:
10+
build-and-publish:
11+
name: Build and publish library to PyPI
12+
runs-on: ubuntu-22.04
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: 3.11
21+
22+
- name: Install flot
23+
run: python -m pip install flot --user
24+
25+
- name: Build binary wheel and source tarball
26+
run: python -m flot --pyproject pyproject-aboutcode.hashid.toml --sdist --wheel --output-dir dist/
27+
28+
- name: Publish to PyPI
29+
if: startsWith(github.ref, 'refs/tags')
30+
uses: pypa/gh-action-pypi-publish@release/v1
31+
with:
32+
password: ${{ secrets.PYPI_API_TOKEN_ABOUTCODE_HASHID }}
33+
34+
- name: Upload built archives
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: pypi_archives
38+
path: dist/*

0 commit comments

Comments
 (0)