Skip to content

Commit 1b3a89b

Browse files
ci: use reuseable-ci v2, dev npm support
Signed-off-by: Josef Andersson <josef.andersson@digg.se> Co-authored-by: Nicklas Silversved <nicklas.silversved@digg.se>
1 parent 31496c5 commit 1b3a89b

File tree

5 files changed

+54
-56
lines changed

5 files changed

+54
-56
lines changed

.github/artifacts.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-FileCopyrightText: 2025 diggsweden/rest-api-profil-lint-processor
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
# Artifacts Configuration for rest-api-profil-lint-processor
6+
# NPM CLI application with container
7+
# NOTE: NPM publishing to GitHub Packages not yet supported in v2-dev
8+
# Package tarballs will be attached to GitHub Release as assets
9+
10+
artifacts:
11+
- name: raplp
12+
project-type: npm
13+
working-directory: .
14+
build-type: application
15+
config:
16+
node-version: 22
17+
18+
# Container builds from source (no artifact dependency)
19+
# Containerfile copies source code and runs npm install
20+
containers:
21+
- name: raplp
22+
container-file: Containerfile
23+
context: .
24+
platforms: linux/amd64,linux/arm64
25+
registry: ghcr.io

.github/workflows/openssfscorecard.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
name: OpenSSF Scorecard analysis
77

88
on:
9-
push:
10-
branches:
11-
- main
129
schedule:
1310
# Weekly on Thursdays at 01:30 UTC
1411
- cron: "30 1 * * 4"
@@ -22,4 +19,4 @@ jobs:
2219
contents: read
2320
security-events: write
2421
id-token: write
25-
uses: diggsweden/reusable-ci/.github/workflows/security-openssf-scorecard.yml@v1
22+
uses: diggsweden/reusable-ci/.github/workflows/security-openssf-scorecard.yml@v2

.github/workflows/pullrequest-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ permissions:
1818

1919
jobs:
2020
pr-checks:
21-
uses: diggsweden/reusable-ci/.github/workflows/pullrequest-orchestrator.yml@v1
21+
uses: diggsweden/reusable-ci/.github/workflows/pullrequest-orchestrator.yml@v2
2222
secrets: inherit # Pass org-level secrets (NPM token if private packages)
2323
permissions:
2424
contents: read # Clone repository and read source code

.github/workflows/release-dev-workflow.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,35 @@
44

55
# Release Workflow Dev
66
#
7-
# This workflow triggers the dev release orchestrator for development and feature branches.
8-
# It creates dev-tagged artifacts and container images for testing.
7+
# Triggers dev builds for testing on development branches.
8+
# Creates:
9+
# - Dev container image (ghcr.io)
10+
# - Dev NPM package (GitHub Packages)
911
#
1012
# Triggers:
1113
# - Push to dev/* or feat/* branches
1214
# - Manual workflow dispatch
1315
#
1416
# Created artifacts:
15-
# - Maven/NPM packages with -dev versions (e.g., 1.2.4-dev.1)
16-
# - Container images with dev tags
17-
# - See release summary for full details
17+
# - NPM package: @diggsweden/rest-api-profil-lint-processor@0.5.9-dev-feat-name-abc1234
18+
# - Container image: ghcr.io/diggsweden/rest-api-profil-lint-processor:0.5.9-dev-feat-name-abc1234
19+
# - Tagged with 'dev' (not 'latest')
1820

1921
name: Release Workflow Dev
2022

2123
on:
22-
push:
23-
branches:
24-
- 'dev/**'
25-
- 'feat/**'
2624
workflow_dispatch:
2725

26+
permissions:
27+
contents: read
28+
2829
jobs:
2930
dev-release:
3031
permissions:
31-
contents: write # Read code and create version bump commits
32-
packages: write # Push dev images to ghcr.io
33-
uses: diggsweden/reusable-ci/.github/workflows/release-dev-orchestrator.yml@v1
32+
contents: read
33+
packages: write
34+
uses: diggsweden/reusable-ci/.github/workflows/release-dev-orchestrator.yml@v2
3435
with:
35-
projectType: npm
36+
project-type: npm
37+
package-scope: "@diggsweden"
3638
secrets: inherit

.github/workflows/release-workflow.yml

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
#
33
# SPDX-License-Identifier: CC0-1.0
44

5-
# Description:
6-
# This workflow handles automated releases using the unified release system
7-
# from diggsweden/.github for NPM packages.
5+
# Release Workflow for rest-api-profil-lint-processor
6+
# Uses the unified release orchestrator for NPM packages
87
---
98
name: Release
109

@@ -25,41 +24,16 @@ permissions:
2524

2625
jobs:
2726
release:
28-
name: Release
29-
if: startsWith(github.ref, 'refs/tags/v') # Only run for version tags
27+
uses: diggsweden/reusable-ci/.github/workflows/release-orchestrator.yml@v2
3028
permissions:
31-
contents: write # Create GitHub releases, push changelog commits
32-
packages: write # Publish NPM package to GitHub registry, push to ghcr.io
33-
id-token: write # Generate OIDC token for package provenance and SLSA
34-
actions: read # Required for SLSA provenance generation
29+
contents: write # Create GitHub releases, push changelog commits
30+
packages: write # Publish to GitHub Packages
31+
id-token: write # Generate OIDC token for SLSA provenance
32+
attestations: write # Attach SBOM attestations
3533
security-events: write # Upload container vulnerability scan results
36-
attestations: write # Attach SBOM attestation to container images
37-
issues: write # Close issues and add release comments
38-
uses: diggsweden/reusable-ci/.github/workflows/release-orchestrator.yml@v1
34+
actions: read # Required for SLSA provenance
35+
secrets: inherit
3936
with:
40-
# Project configuration
41-
projectType: npm # Build system (reads version from package.json)
42-
branch: main # Base branch for changelog generation
43-
44-
# Artifact publisher configuration
45-
artifactPublisher: npm-app-github # Publish to GitHub NPM registry
46-
# Uses default Node version (22.x)
47-
48-
# Container builder configuration
49-
containerBuilder: containerimage-ghcr # Build Docker image and push to ghcr.io
50-
# Defaults: linux/amd64, SLSA provenance, SBOM generation enabled
51-
52-
# NPM specific - files to commit when version changes
53-
file_pattern: "CHANGELOG.md package.json package-lock.json"
54-
55-
# Changelog configuration
56-
changelogCreator: git-cliff # Generate from conventional commits
57-
# Uses default changelog format
58-
59-
# Release publisher configuration
60-
releasePublisher: github-cli # GitHub CLI better for NPM than JReleaser
61-
release.generatesbom: true # Include SBOM in release assets
62-
release.signartifacts: true # GPG sign all release artifacts
63-
64-
# Release type auto-detected from tag (v1.0.0 = stable, v1.0.0-beta = prerelease)
65-
secrets: inherit # Use org-level NPM_TOKEN and GPG keys if available
37+
artifacts-config: .github/artifacts.yml
38+
file-pattern: "CHANGELOG.md package.json package-lock.json"
39+
release-publisher: github-cli

0 commit comments

Comments
 (0)