Skip to content

Commit 02b7f88

Browse files
committed
add versioned sdk deployment back to action after testing
1 parent c933918 commit 02b7f88

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed

.github/workflows/publish-package-to-npmjs.yml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@ jobs:
5656
run: npm install
5757
- name: Build script
5858
run: npm run build -- --mode=${{ matrix.target }}
59-
# - uses: actions/upload-artifact@v4
60-
# if: inputs.publish_to_cdn
61-
# with:
62-
# name: uid2SDK-${{ matrix.target }}-${{ steps.version.outputs.package_version }}
63-
# path: ./dist/uid2-sdk-${{ steps.version.outputs.package_version }}.js
59+
- uses: actions/upload-artifact@v4
60+
if: inputs.publish_to_cdn
61+
with:
62+
name: uid2SDK-${{ matrix.target }}-${{ steps.version.outputs.package_version }}
63+
path: ./dist/uid2-sdk-${{ steps.version.outputs.package_version }}.js
6464
- uses: actions/upload-artifact@v4
6565
if: inputs.publish_to_cdn
6666
with:
6767
name: uid2SDK-${{ matrix.target }}-latest
6868
path: ./dist/uid2-sdk-latest.js
69-
# - uses: actions/upload-artifact@v4
70-
# if: inputs.publish_to_cdn
71-
# with:
72-
# name: euidSDK-${{ matrix.target }}-${{ steps.version.outputs.package_version }}
73-
# path: ./dist/euid-sdk-${{ steps.version.outputs.package_version }}.js
69+
- uses: actions/upload-artifact@v4
70+
if: inputs.publish_to_cdn
71+
with:
72+
name: euidSDK-${{ matrix.target }}-${{ steps.version.outputs.package_version }}
73+
path: ./dist/euid-sdk-${{ steps.version.outputs.package_version }}.js
7474
- uses: actions/upload-artifact@v4
7575
if: inputs.publish_to_cdn
7676
with:
@@ -94,20 +94,20 @@ jobs:
9494
- run: npm ci
9595
- name: Build package
9696
run: npm run build-package
97-
# - name: Publish Latest package
98-
# if: ${{!github.event.inputs.with_tag}}
99-
# run: |
100-
# npm publish ./dist/uid2-npm --access public
101-
# npm publish ./dist/euid-npm --access public
102-
# env:
103-
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
104-
# - name: Publish Latest package with tag
105-
# if: ${{github.event.inputs.with_tag}}
106-
# run: |
107-
# npm publish ./dist/uid2-npm --tag ${{github.event.inputs.with_tag}} --access public
108-
# npm publish ./dist/euid-npm --tag ${{github.event.inputs.with_tag}} --access public
109-
# env:
110-
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
97+
- name: Publish Latest package
98+
if: ${{!github.event.inputs.with_tag}}
99+
run: |
100+
npm publish ./dist/uid2-npm --access public
101+
npm publish ./dist/euid-npm --access public
102+
env:
103+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
104+
- name: Publish Latest package with tag
105+
if: ${{github.event.inputs.with_tag}}
106+
run: |
107+
npm publish ./dist/uid2-npm --tag ${{github.event.inputs.with_tag}} --access public
108+
npm publish ./dist/euid-npm --tag ${{github.event.inputs.with_tag}} --access public
109+
env:
110+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
111111
cdn-deployment-uid2:
112112
if: inputs.publish_to_cdn
113113
needs: [build, incrementVersionNumber]
@@ -122,14 +122,14 @@ jobs:
122122
- uses: actions/checkout@v4
123123
with:
124124
ref: ${{ needs.incrementVersionNumber.outputs.git_tag_or_hash }}
125-
# - uses: ./.github/actions/cdn_deployment_aws
126-
# with:
127-
# environment: ${{ matrix.environment }}
128-
# artifact: uid2SDK-${{ (matrix.environment == 'integ' && 'development') || matrix.environment }}-${{ needs.build.outputs.sdkVersion}}
129-
# invalidate_paths: '/uid2-sdk-${{ needs.build.outputs.sdkVersion}}.js'
130-
# aws_account_id: ${{ vars.AWS_ACCOUNT_ID }}
131-
# aws_bucket_name: ${{ vars.S3_BUCKET }}
132-
# aws_distribution_id: ${{ secrets.AWS_DISTRIBUTION_ID }}
125+
- uses: ./.github/actions/cdn_deployment_aws
126+
with:
127+
environment: ${{ matrix.environment }}
128+
artifact: uid2SDK-${{ (matrix.environment == 'integ' && 'development') || matrix.environment }}-${{ needs.build.outputs.sdkVersion}}
129+
invalidate_paths: '/uid2-sdk-${{ needs.build.outputs.sdkVersion}}.js'
130+
aws_account_id: ${{ vars.AWS_ACCOUNT_ID }}
131+
aws_bucket_name: ${{ vars.S3_BUCKET }}
132+
aws_distribution_id: ${{ secrets.AWS_DISTRIBUTION_ID }}
133133
- uses: ./.github/actions/cdn_deployment_aws
134134
with:
135135
environment: ${{ matrix.environment }}
@@ -152,14 +152,14 @@ jobs:
152152
- uses: actions/checkout@v4
153153
with:
154154
ref: ${{ needs.incrementVersionNumber.outputs.git_tag_or_hash }}
155-
# - uses: ./.github/actions/cdn_deployment_aws
156-
# with:
157-
# environment: ${{ matrix.environment }}
158-
# artifact: euidSDK-${{ (matrix.environment == 'integ' && 'development') || matrix.environment }}-${{ needs.build.outputs.sdkVersion}}
159-
# invalidate_paths: '/euid-sdk-${{ needs.build.outputs.sdkVersion}}.js'
160-
# aws_account_id: ${{ vars.EUID_AWS_ACCOUNT_ID }}
161-
# aws_bucket_name: ${{ vars.EUID_S3_BUCKET }}
162-
# aws_distribution_id: ${{ secrets.EUID_AWS_DISTRIBUTION_ID }}
155+
- uses: ./.github/actions/cdn_deployment_aws
156+
with:
157+
environment: ${{ matrix.environment }}
158+
artifact: euidSDK-${{ (matrix.environment == 'integ' && 'development') || matrix.environment }}-${{ needs.build.outputs.sdkVersion}}
159+
invalidate_paths: '/euid-sdk-${{ needs.build.outputs.sdkVersion}}.js'
160+
aws_account_id: ${{ vars.EUID_AWS_ACCOUNT_ID }}
161+
aws_bucket_name: ${{ vars.EUID_S3_BUCKET }}
162+
aws_distribution_id: ${{ secrets.EUID_AWS_DISTRIBUTION_ID }}
163163
- uses: ./.github/actions/cdn_deployment_aws
164164
with:
165165
environment: ${{ matrix.environment }}

0 commit comments

Comments
 (0)