Skip to content

Commit 0cca42f

Browse files
committed
[patch] fix release.sh
2 problems: - the s3 publishes should not have had acl (i got this from what was there before) - the npm publish needs a valid token
1 parent 5459f83 commit 0cca42f

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/workflows/deploy-release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,16 @@ jobs:
6868
- name: Configure NPM
6969
run: npm ci
7070

71-
- name: Release to npm, s3, prod
71+
- run: make release
72+
73+
- name: Publish to s3
7274
run: |
73-
./deployment/release.sh ${{ steps.next-version.outputs.result }}
75+
./deployment/release-s3.sh ${{ steps.next-version.outputs.result }}
76+
77+
- name: Publish to npm
78+
env:
79+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISHER_TOKEN }}
80+
run: npm publish
7481

7582
- name: Create Github Release
7683
uses: actions/github-script@v7
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ make release
1212

1313
./deployment/build-example-html.sh "key_live_hcnegAumkH7Kv18M8AOHhfgiohpXq5tB" "https://api2.branch.io" "https://cdn.branch.io/branch-latest.min.js"
1414
aws s3 cp example.html s3://branch-builds/example.html
15+
aws s3 cp example.html s3://branch-cdn/example.html
1516

16-
aws s3 cp --content-type="text/javascript" --content-encoding="gzip" dist/build.min.js.gz s3://branch-cdn/branch-$VERSION.min.js --acl public-read
17-
aws s3 cp --content-type="text/javascript" --content-encoding="gzip" dist/build.min.js.gz s3://branch-cdn/branch-latest.min.js --acl public-read
17+
aws s3 cp --content-type="text/javascript" --content-encoding="gzip" dist/build.min.js.gz s3://branch-cdn/branch-$VERSION.min.js --cache-control "max-age=300"
18+
aws s3 cp --content-type="text/javascript" --content-encoding="gzip" dist/build.min.js.gz s3://branch-cdn/branch-latest.min.js --cache-control "max-age=300"
1819

1920
echo -en "Invalidating cloudfront distribution...\n"
2021
aws configure set preview.cloudfront true
2122
aws cloudfront create-invalidation --distribution-id E10P37NG0GMER --paths /branch-latest.min.js
2223

23-
npm publish
2424

2525
echo "Post-release sanity checks."
2626
read -p "Can you visit https://cdn.branch.io/branch-$VERSION.min.js ?" -n 1 -r

0 commit comments

Comments
 (0)