Skip to content

Commit 244c5da

Browse files
Merge branch 'main' of ../commoncode-filter into fix-ignore-pre-scan-plugin
Signed-off-by: Ayan Sinha Mahapatra <asmahapatra@aboutcode.org>
2 parents da248c8 + 638e3b4 commit 244c5da

4 files changed

Lines changed: 513 additions & 0 deletions

File tree

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Create library release archives, create a GH release and publish PyPI wheel and sdist on tag in main branch
2+
3+
4+
# This is executed automatically on a tag in the main branch
5+
6+
# Summary of the steps:
7+
# - build wheels and sdist
8+
# - upload wheels and sdist to PyPI
9+
# - create gh-release and upload wheels and dists there
10+
# TODO: smoke test wheels and sdist
11+
# TODO: add changelog to release text body
12+
13+
# WARNING: this is designed only for packages building as pure Python wheels
14+
15+
on:
16+
workflow_dispatch:
17+
push:
18+
tags:
19+
- "v*.*.*"
20+
21+
jobs:
22+
build-pypi-distribs:
23+
name: Build and publish library to PyPI
24+
runs-on: ubuntu-24.04
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
29+
with:
30+
persist-credentials: false # do not keep the token around
31+
32+
- name: Set up Python 3.12
33+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
34+
with:
35+
python-version: 3.12
36+
37+
- name: Install pypa/build and twine
38+
run: python -m pip install --user build twine
39+
40+
- name: Build a binary wheel and a source tarball
41+
run: python -m build --sdist --wheel --outdir dist/
42+
43+
- name: Validate wheel and sdis for Pypi
44+
run: python -m twine check dist/*
45+
46+
- name: Upload built archives
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: pypi_archives
50+
path: dist/*
51+
52+
53+
create-gh-release:
54+
name: Create GH release
55+
needs:
56+
- build-pypi-distribs
57+
runs-on: ubuntu-24.04
58+
59+
steps:
60+
- name: Download built archives
61+
uses: actions/download-artifact@v4
62+
with:
63+
name: pypi_archives
64+
path: dist
65+
66+
- name: Create GH release
67+
uses: softprops/action-gh-release@v2
68+
with:
69+
draft: true
70+
files: dist/*
71+
72+
73+
create-pypi-release:
74+
name: Create PyPI release
75+
needs:
76+
- create-gh-release
77+
runs-on: ubuntu-24.04
78+
environment: pypi-publish
79+
permissions:
80+
id-token: write
81+
82+
steps:
83+
- name: Download built archives
84+
uses: actions/download-artifact@v4
85+
with:
86+
name: pypi_archives
87+
path: dist
88+
89+
- name: Publish to PyPI
90+
if: startsWith(github.ref, 'refs/tags')
91+
uses: pypa/gh-action-pypi-publish@release/v1

AUTHORS.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ The following organizations or individuals have contributed to ScanCode:
2222
- Chaitya Shah @Chaitya62
2323
- Chin-Yeung Li @chinyeungli
2424
- Clement Poulain @FOSS117
25+
- Conley Owens @cco3
2526
- Daniel Eder @daniel-eder
2627
- Dan Kegel @dankegel
2728
- Dennis Clark @DennisClark
@@ -87,6 +88,7 @@ The following organizations or individuals have contributed to ScanCode:
8788
- Shivam Sandbhor @sbs2001
8889
- Steven Esser @majurg
8990
- Sushant Gupta @susg
91+
- Theodore Aptekarev @piiq
9092
- Thomas Druez @tdruez
9193
- Thomas Steenbergen @tsteenbe
9294
- Thorsten Harter @ThorstenHarter

0 commit comments

Comments
 (0)