Skip to content

Commit c401a14

Browse files
Merge remote-tracking branch 'origin/main' into sch-UID2-6742-update-node20-actions
# Conflicts: # .github/actions/cdn_deployment_aws/action.yaml # .github/workflows/publish-cstg-example.yml # .github/workflows/publish-js-sdk-example.yml # .github/workflows/publish-package-to-cdn.yml # .github/workflows/publish-package-to-npmjs.yml # .github/workflows/publish-secure-signal-examples.yml # .github/workflows/secureSignal-cd.yaml # .github/workflows/secureSignal-to-cdn.yaml
2 parents 690103c + a543b48 commit c401a14

101 files changed

Lines changed: 4324 additions & 36658 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: Build SDK Package
2+
run-name: ${{ inputs.release_type == 'Snapshot' && 'Build Pre-release' || format('Build {0}', inputs.release_type)}} SDK Package by @${{ github.actor }}
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
release_type:
8+
type: choice
9+
description: The type of release
10+
options:
11+
- Major
12+
- Minor
13+
- Patch
14+
- Snapshot
15+
required: true
16+
17+
jobs:
18+
incrementVersionNumber:
19+
uses: IABTechLab/uid2-shared-actions/.github/workflows/shared-increase-version-number.yaml@v3
20+
with:
21+
release_type: ${{ inputs.release_type }}
22+
merge_environment: ${{ github.ref_protected && 'ci-auto-merge' || '' }}
23+
secrets: inherit
24+
25+
build:
26+
runs-on: ubuntu-latest
27+
needs: [incrementVersionNumber]
28+
strategy:
29+
matrix:
30+
node-version: [20.x]
31+
target: [development, production]
32+
steps:
33+
- uses: actions/checkout@v4
34+
with:
35+
ref: ${{ needs.incrementVersionNumber.outputs.git_tag_or_hash }}
36+
- name: Use Node.js ${{ matrix.node-version }}
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: ${{ matrix.node-version }}
40+
- name: Get Package Version
41+
id: version
42+
run: |
43+
echo "package_version=$(cat package.json | jq -r '.version')" >> $GITHUB_OUTPUT
44+
- name: Install dependencies
45+
run: npm install
46+
- name: Build SDK for CDN
47+
run: npm run build -- --mode=${{ matrix.target }}
48+
- name: Build NPM Package
49+
if: matrix.target == 'production'
50+
run: npm run build-package
51+
52+
# Upload SDK artifacts for CDN
53+
- name: Upload UID2 SDK artifact
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: uid2SDK-${{ matrix.target }}-${{ steps.version.outputs.package_version }}
57+
path: ./dist/uid2-sdk-${{ steps.version.outputs.package_version }}.js
58+
retention-days: 30
59+
60+
- name: Upload EUID SDK artifact
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: euidSDK-${{ matrix.target }}-${{ steps.version.outputs.package_version }}
64+
path: ./dist/euid-sdk-${{ steps.version.outputs.package_version }}.js
65+
retention-days: 30
66+
67+
# Upload NPM package artifacts
68+
- name: Upload UID2 NPM package
69+
if: matrix.target == 'production'
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: uid2-npm-package-${{ steps.version.outputs.package_version }}
73+
path: ./dist/uid2-npm/
74+
retention-days: 30
75+
76+
- name: Upload EUID NPM package
77+
if: matrix.target == 'production'
78+
uses: actions/upload-artifact@v4
79+
with:
80+
name: euid-npm-package-${{ steps.version.outputs.package_version }}
81+
path: ./dist/euid-npm/
82+
retention-days: 30
83+
84+
outputs:
85+
sdkVersion: ${{ steps.version.outputs.package_version }}
86+
git_tag: ${{ needs.incrementVersionNumber.outputs.git_tag_or_hash }}
87+
new_version: ${{ needs.incrementVersionNumber.outputs.new_version }}
88+
89+
createNpmJsRelease:
90+
needs: [incrementVersionNumber, build]
91+
runs-on: ubuntu-latest
92+
steps:
93+
- name: Build Changelog
94+
id: github_release_changelog
95+
uses: mikepenz/release-changelog-builder-action@32e3c96f29a6532607f638797455e9e98cfc703d # v4
96+
with:
97+
toTag: v${{ needs.incrementVersionNumber.outputs.new_version }}
98+
configurationJson: |
99+
{
100+
"pr_template": " - #{{TITLE}} - ( PR: ##{{NUMBER}} )"
101+
}
102+
- name: Create Release Notes
103+
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2
104+
with:
105+
name: v${{ needs.incrementVersionNumber.outputs.new_version }}
106+
body: ${{ steps.github_release_changelog.outputs.changelog }}
107+
draft: true
108+
109+
build-summary:
110+
needs: [build, incrementVersionNumber]
111+
runs-on: ubuntu-latest
112+
steps:
113+
- name: Build Summary
114+
run: |
115+
echo "## Build Complete! 🎉" >> $GITHUB_STEP_SUMMARY
116+
echo "" >> $GITHUB_STEP_SUMMARY
117+
echo "**Version:** ${{ needs.build.outputs.sdkVersion }}" >> $GITHUB_STEP_SUMMARY
118+
echo "**Git Tag:** ${{ needs.build.outputs.git_tag }}" >> $GITHUB_STEP_SUMMARY
119+
echo "" >> $GITHUB_STEP_SUMMARY
120+
echo "### Artifacts Built:" >> $GITHUB_STEP_SUMMARY
121+
echo "- ✅ uid2SDK-development-${{ needs.build.outputs.sdkVersion }}" >> $GITHUB_STEP_SUMMARY
122+
echo "- ✅ uid2SDK-production-${{ needs.build.outputs.sdkVersion }}" >> $GITHUB_STEP_SUMMARY
123+
echo "- ✅ euidSDK-development-${{ needs.build.outputs.sdkVersion }}" >> $GITHUB_STEP_SUMMARY
124+
echo "- ✅ euidSDK-production-${{ needs.build.outputs.sdkVersion }}" >> $GITHUB_STEP_SUMMARY
125+
echo "- ✅ uid2-npm-package-${{ needs.build.outputs.sdkVersion }}" >> $GITHUB_STEP_SUMMARY
126+
echo "- ✅ euid-npm-package-${{ needs.build.outputs.sdkVersion }}" >> $GITHUB_STEP_SUMMARY
127+
echo "" >> $GITHUB_STEP_SUMMARY
128+
echo "### Next Steps:" >> $GITHUB_STEP_SUMMARY
129+
echo "Run the **Publish SDK Package** workflow in the private repo to deploy these artifacts." >> $GITHUB_STEP_SUMMARY
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Build Secure Signal Package
2+
run-name: Build Secure Signal Package by @${{ github.actor }}
3+
4+
on:
5+
workflow_dispatch:
6+
7+
env:
8+
WORKING_DIR: ./
9+
10+
jobs:
11+
verify:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
uid2_modified: ${{ steps.verify_uid2.outputs.any_modified }}
15+
euid_modified: ${{ steps.verify_euid.outputs.any_modified }}
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Check for change to src/secureSignalUid2.ts
19+
id: verify_uid2
20+
uses: tj-actions/changed-files@716b1e13042866565e00e85fd4ec490e186c4a2f # v41
21+
with:
22+
files: src/secureSignalUid2.ts
23+
- name: Check for change to src/secureSignalEuid.ts
24+
id: verify_euid
25+
uses: tj-actions/changed-files@716b1e13042866565e00e85fd4ec490e186c4a2f # v41
26+
with:
27+
files: src/secureSignalEuid.ts
28+
29+
build:
30+
needs: [verify]
31+
runs-on: ubuntu-latest
32+
strategy:
33+
matrix:
34+
node-version: [20.x]
35+
target: [development, production]
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
- name: Use Node.js ${{ matrix.node-version }}
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: ${{ matrix.node-version }}
43+
cache: 'npm'
44+
cache-dependency-path: ${{ env.WORKING_DIR }}/package-lock.json
45+
- name: Install dependencies
46+
run: npm install
47+
- name: Build
48+
run: npm run build:secureSignals -- --mode=${{ matrix.target }}
49+
50+
# Upload UID2 Secure Signals Files
51+
- name: Upload UID2 Secure Signals Files
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: ${{ matrix.target }}Uid2SecureSignalScript
55+
path: ./dist/uid2SecureSignal.js
56+
retention-days: 30
57+
58+
# Upload EUID Secure Signals Files
59+
- name: Upload EUID Secure Signals Files
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: ${{ matrix.target }}EuidSecureSignalScript
63+
path: ./dist/euidSecureSignal.js
64+
retention-days: 30
65+
66+
build-summary:
67+
needs: [build, verify]
68+
runs-on: ubuntu-latest
69+
steps:
70+
- name: Build Summary
71+
run: |
72+
echo "## Secure Signal Build Complete! 🎉" >> $GITHUB_STEP_SUMMARY
73+
echo "" >> $GITHUB_STEP_SUMMARY
74+
echo "### Files Modified:" >> $GITHUB_STEP_SUMMARY
75+
echo "- UID2 Modified: ${{ needs.verify.outputs.uid2_modified }}" >> $GITHUB_STEP_SUMMARY
76+
echo "- EUID Modified: ${{ needs.verify.outputs.euid_modified }}" >> $GITHUB_STEP_SUMMARY
77+
echo "" >> $GITHUB_STEP_SUMMARY
78+
echo "### Artifacts Built:" >> $GITHUB_STEP_SUMMARY
79+
echo "- ✅ developmentUid2SecureSignalScript" >> $GITHUB_STEP_SUMMARY
80+
echo "- ✅ productionUid2SecureSignalScript" >> $GITHUB_STEP_SUMMARY
81+
echo "- ✅ developmentEuidSecureSignalScript" >> $GITHUB_STEP_SUMMARY
82+
echo "- ✅ productionEuidSecureSignalScript" >> $GITHUB_STEP_SUMMARY
83+
echo "" >> $GITHUB_STEP_SUMMARY
84+
echo "### Next Steps:" >> $GITHUB_STEP_SUMMARY
85+
echo "Run the **Publish Secure Signal Package** workflow in the private repo to deploy these artifacts." >> $GITHUB_STEP_SUMMARY

.github/workflows/release-secure-signal-examples-docker-image-server-only.yaml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/release-secure-signal-examples-docker-image-standard.yaml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/release-secure-signals-client-side-uid2.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/release-secure-signals-react-uid2.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

examples/cstg/Dockerfile

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/cstg/html/iframe.html

Lines changed: 0 additions & 10 deletions
This file was deleted.
-1.93 KB
Binary file not shown.

0 commit comments

Comments
 (0)