Skip to content

Commit d144ff9

Browse files
committed
add secure signal
1 parent 917c71a commit d144ff9

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed
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@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@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:esp -- --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

0 commit comments

Comments
 (0)