Skip to content

Commit ee8d867

Browse files
committed
fix: enable github workflows
Signed-off-by: Phil Adams <[email protected]>
1 parent 2868633 commit ee8d867

File tree

4 files changed

+136
-7
lines changed

4 files changed

+136
-7
lines changed

.github/workflows/build.yaml

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# This workflow will build and unit test the project.
2+
# If the workflow is running on the "main" branch, then
3+
# semantic-release is also run to create a new release (if
4+
# warranted by the new commits being built).
5+
6+
name: Build/Test
7+
8+
on:
9+
push:
10+
branches: ['**']
11+
pull_request:
12+
branches: ['**']
13+
workflow_dispatch:
14+
# Allow workflow to be triggered manually.
15+
16+
jobs:
17+
detect-secrets:
18+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
19+
name: Detect-Secrets
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: 3.13
30+
31+
- name: Install detect-secrets
32+
run: |
33+
pip install --upgrade "git+https://github.com/ibm/detect-secrets.git@master#egg=detect-secrets"
34+
35+
- name: Run detect-secrets
36+
run: |
37+
detect-secrets scan --update .secrets.baseline
38+
detect-secrets -v audit --report --fail-on-unaudited --fail-on-live --fail-on-audited-real .secrets.baseline
39+
40+
build:
41+
needs: detect-secrets
42+
name: Build/Test (Python ${{ matrix.python-version }})
43+
44+
runs-on: ubuntu-latest
45+
strategy:
46+
matrix:
47+
python-version: ['3.9', '3.13']
48+
49+
steps:
50+
- name: Checkout repository
51+
uses: actions/checkout@v4
52+
53+
- name: Set up Python ${{ matrix.python-version }}
54+
uses: actions/setup-python@v5
55+
with:
56+
python-version: ${{ matrix.python-version }}
57+
58+
- name: Build & Test
59+
run: make ci
60+
61+
create-release:
62+
needs: build
63+
name: Semantic-Release
64+
if: "github.ref_name == 'main' && github.event_name != 'pull_request'"
65+
runs-on: ubuntu-latest
66+
67+
steps:
68+
- name: Checkout repository
69+
uses: actions/checkout@v4
70+
with:
71+
persist-credentials: false
72+
73+
- name: Setup Node.js
74+
uses: actions/setup-node@v4
75+
with:
76+
node-version: 22
77+
78+
- name: Setup Python
79+
uses: actions/setup-python@v5
80+
with:
81+
python-version: 3.13
82+
83+
- name: Install Publishing Tools
84+
run: |
85+
pip install bump-my-version
86+
npm install
87+
88+
- name: Run semantic-release
89+
env:
90+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
91+
run: npm run semantic-release

.github/workflows/publish.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow is responsible for:
2+
# - publishing artifacts to Maven Central
3+
# - building and publishing javadocs to the git repository.
4+
# It is triggered when a new release is created.
5+
6+
name: Publish
7+
on:
8+
release:
9+
types: [created]
10+
workflow_dispatch:
11+
# Allow this workflow to be triggered manually
12+
13+
jobs:
14+
publish:
15+
name: Publish Release
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
persist-credentials: false
23+
24+
- name: Setup Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: 3.13
28+
29+
- name: Build and publish distribution
30+
env:
31+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
32+
run: |
33+
make ci
34+
make publish-release

.secrets.baseline

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "package-lock.json|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2024-10-10T16:00:10Z",
6+
"generated_at": "2025-01-09T21:56:01Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -346,23 +346,23 @@
346346
"hashed_secret": "4080eeeaf54faf879b9e8d99c49a8503f7e855bb",
347347
"is_secret": false,
348348
"is_verified": false,
349-
"line_number": 17,
349+
"line_number": 37,
350350
"type": "Secret Keyword",
351351
"verified_result": null
352352
},
353353
{
354354
"hashed_secret": "37e94c31b6a756ba2afd2fe9a9765172cd79ac47",
355355
"is_secret": false,
356356
"is_verified": false,
357-
"line_number": 102,
357+
"line_number": 110,
358358
"type": "Secret Keyword",
359359
"verified_result": null
360360
},
361361
{
362362
"hashed_secret": "da2f27d2c57a0e1ed2dc3a34b4ef02faf2f7a4c2",
363363
"is_secret": false,
364364
"is_verified": false,
365-
"line_number": 123,
365+
"line_number": 131,
366366
"type": "Hex High Entropy String",
367367
"verified_result": null
368368
}
@@ -372,15 +372,15 @@
372372
"hashed_secret": "da2f27d2c57a0e1ed2dc3a34b4ef02faf2f7a4c2",
373373
"is_secret": false,
374374
"is_verified": false,
375-
"line_number": 62,
375+
"line_number": 63,
376376
"type": "Hex High Entropy String",
377377
"verified_result": null
378378
},
379379
{
380380
"hashed_secret": "37e94c31b6a756ba2afd2fe9a9765172cd79ac47",
381381
"is_secret": false,
382382
"is_verified": false,
383-
"line_number": 205,
383+
"line_number": 206,
384384
"type": "Secret Keyword",
385385
"verified_result": null
386386
}

Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ all: upgrade-pip setup test-unit lint
1212

1313
ci: all
1414

15-
publish-release: build-dist publish-dist
15+
publish-release: publish-deps build-dist publish-dist
1616

1717
upgrade-pip:
1818
${PYTHON} -m pip install --upgrade pip
@@ -23,6 +23,10 @@ deps:
2323
dev-deps:
2424
${PYTHON} -m pip install .[dev]
2525

26+
detect-secrets:
27+
detect-secrets scan --update .secrets.baseline
28+
detect-secrets audit .secrets.baseline
29+
2630
publish-deps:
2731
${PYTHON} -m pip install .[publish]
2832

0 commit comments

Comments
 (0)