File tree Expand file tree Collapse file tree 3 files changed +16
-10
lines changed
Expand file tree Collapse file tree 3 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 2525 java-version : ${{ env.JAVA_VERSION }}
2626 distribution : ${{ env.JAVA_DISTRIBUTION }}
2727
28+ - name : Write version to files
29+ run : |
30+ ./deployment/write-versions.sh ${{ steps.next-version.outputs.result }}
31+
2832 - name : Install dependencies
2933 run : npm run ci
3034
@@ -100,11 +104,6 @@ jobs:
100104 env :
101105 INPUT_SHA : ${{ env.INPUT_SHA }}
102106
103- - name : Write version to files
104- if : ${{ github.ref == 'refs/heads/master' }}
105- run : |
106- ./deployment/write-versions.sh ${{ steps.next-version.outputs.result }}
107-
108107 - name : Deploy updated builds to staging
109108 if : ${{ github.ref == 'refs/heads/master' }}
110109 id : build
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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"
1414aws 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
1920echo -en " Invalidating cloudfront distribution...\n"
2021aws configure set preview.cloudfront true
2122aws cloudfront create-invalidation --distribution-id E10P37NG0GMER --paths /branch-latest.min.js
2223
23- npm publish
2424
2525echo " Post-release sanity checks."
2626read -p " Can you visit https://cdn.branch.io/branch-$VERSION .min.js ?" -n 1 -r
You can’t perform that action at this time.
0 commit comments