Skip to content

Commit 9fd0cc6

Browse files
authored
Merge pull request #19 from ashwinkumar6/main-feat
release (AmplifyJS): AmplifyJS release
2 parents 1f5eefd + 12263ab commit 9fd0cc6

File tree

6 files changed

+60
-268
lines changed

6 files changed

+60
-268
lines changed

.github/actions/npm-publish/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ inputs:
1717
npm_token:
1818
description: The npm token that gives the job npm permissions
1919
required: true
20+
gh_token:
21+
description: The github token that gives the job permissions to publish release notes on github
22+
required: true
2023

2124
runs:
2225
using: 'composite'
@@ -31,11 +34,11 @@ runs:
3134
git config --global user.name $GITHUB_USER
3235
3336
- name: Run npm publish
34-
if: github.repository_owner == 'aws-amplify'
3537
shell: bash
3638
working-directory: ./amplify-js
3739
env:
3840
NPM_TOKEN: ${{ inputs.npm_token }}
41+
GH_TOKEN: ${{ inputs.gh_token }}
3942
GH_SHA: ${{ github.sha }}
4043
TARGET: ${{ inputs.target }}
4144
PREID_PREFIX: ${{ inputs.preid || '' }}

.github/workflows/callable-npm-publish-release.yml

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,45 +11,52 @@ jobs:
1111
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
1212
with:
1313
path: amplify-js
14-
token: ${{ secrets.GH_TOKEN_AMPLIFY_JS_WRITE }}
1514

1615
- name: Setup node and build the repository
1716
uses: ./amplify-js/.github/actions/node-and-build
1817

18+
###
19+
# TODO Remove this to enable real NPM interactions.
20+
# <remove>
21+
- name: Load Verdaccio with AmplifyJs
22+
uses: ./amplify-js/.github/actions/load-verdaccio-with-amplify-js
23+
### </remove>
24+
1925
- name: Run npm publish
2026
uses: ./amplify-js/.github/actions/npm-publish
2127
with:
2228
target: release
2329
npm_token: ${{ secrets.NPM_TOKEN }}
30+
gh_token: ${{ secrets.GITHUB_TOKEN }}
2431
github_user: ${{ vars.GH_USER}}
2532
github_email: ${{ vars.GH_EMAIL}}
2633

27-
- name: Set github commit user
28-
env:
29-
GITHUB_EMAIL: ${{ vars.GH_EMAIL }}
30-
GITHUB_USER: ${{ vars.GH_USER }}
31-
run: |
32-
git config --global user.email $GITHUB_EMAIL
33-
git config --global user.name $GITHUB_USER
34-
35-
- name: Update roll-back infrastructure
36-
working-directory: ./amplify-js
37-
run: |
38-
git pull origin release
39-
PUBLISH_COMMIT_HASH=$(git log -n 1 --pretty=format:"%H")
40-
RELEASE_COMMIT_MESSAGE=$(git log -n 1 --skip 1 --pretty=oneline)
41-
if [[ $RELEASE_COMMIT_MESSAGE = *release\(required\)* ]]; then git tag -f required-release $PUBLISH_COMMIT_HASH; fi
42-
43-
- name: Update API documentation
44-
working-directory: ./amplify-js
45-
run: |
46-
yarn run docs
47-
git add ./docs/api/
48-
git commit -m "chore(release): update API docs [ci skip]"
49-
50-
- name: Push post release changes
51-
working-directory: ./amplify-js
52-
run: |
53-
git push origin release
54-
if [ $(git tag -l "required-release") ]; then git push -f origin required-release; fi
55-
git push --force-with-lease origin release:main
34+
# - name: Set github commit user
35+
# env:
36+
# GITHUB_EMAIL: ${{ vars.GH_EMAIL }}
37+
# GITHUB_USER: ${{ vars.GH_USER }}
38+
# run: |
39+
# git config --global user.email $GITHUB_EMAIL
40+
# git config --global user.name $GITHUB_USER
41+
42+
# - name: Update roll-back infrastructure
43+
# working-directory: ./amplify-js
44+
# run: |
45+
# git pull origin release
46+
# PUBLISH_COMMIT_HASH=$(git log -n 1 --pretty=format:"%H")
47+
# RELEASE_COMMIT_MESSAGE=$(git log -n 1 --skip 1 --pretty=oneline)
48+
# if [[ $RELEASE_COMMIT_MESSAGE = *release\(required\)* ]]; then git tag -f required-release $PUBLISH_COMMIT_HASH; fi
49+
50+
# - name: Update API documentation
51+
# working-directory: ./amplify-js
52+
# run: |
53+
# yarn run docs
54+
# git add ./docs/api/
55+
# git commit -m "chore(release): update API docs [ci skip]"
56+
57+
# - name: Push post release changes
58+
# working-directory: ./amplify-js
59+
# run: |
60+
# git push origin release
61+
# if [ $(git tag -l "required-release") ]; then git push -f origin required-release; fi
62+
# git push --force-with-lease origin release:main

.github/workflows/push-main-release.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,21 @@ on:
1111
- main
1212

1313
jobs:
14-
e2e:
14+
# e2e:
15+
# secrets: inherit
16+
# uses: ./.github/workflows/callable-release-verification.yml
17+
# unstable-release:
18+
# needs:
19+
# - e2e
20+
# secrets: inherit
21+
# uses: ./.github/workflows/callable-npm-publish-preid.yml
22+
# with:
23+
# preid: unstable
24+
# allow-protected-preid: true
25+
release:
26+
# needs:
27+
# - e2e
28+
permissions:
29+
contents: write
1530
secrets: inherit
16-
uses: ./.github/workflows/callable-release-verification.yml
17-
unstable-release:
18-
needs:
19-
- e2e
20-
secrets: inherit
21-
uses: ./.github/workflows/callable-npm-publish-preid.yml
22-
with:
23-
preid: unstable
24-
allow-protected-preid: true
31+
uses: ./.github/workflows/callable-npm-publish-release.yml

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"unlink-all": "lerna exec --no-bail --parallel -- yarn unlink; exit 0",
3030
"publish:preid": "./scripts/preid-env-vars-exist.sh && lerna publish --canary --force-publish --dist-tag=${PREID_PREFIX} --preid=${PREID_PREFIX}${PREID_HASH_SUFFIX} --yes",
3131
"publish:main": "lerna publish --canary --force-publish --dist-tag=unstable --preid=unstable${PREID_HASH_SUFFIX} --yes",
32-
"publish:release": "lerna publish --conventional-commits --dist-tag=v6 --message 'chore(release): Publish [ci skip]' --yes",
32+
"publish:release": "lerna publish --conventional-commits --message 'chore(release): Publish [ci skip]' --yes",
33+
"publish:release:new": "lerna publish --conventional-commits --create-release github --message 'chore(release): Publish [ci skip]' --yes",
3334
"publish:v5-stable": "lerna publish --conventional-commits --yes --dist-tag=stable-5 --message 'chore(release): Publish [ci skip]' --no-verify-access",
3435
"publish:verdaccio": "lerna publish --canary --force-publish --no-push --dist-tag=unstable --preid=unstable --yes",
3536
"ts-coverage": "lerna run ts-coverage",

packages/auth/__tests__/utils/getAuthUserAgentDetails.test.ts

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

packages/storage/__tests__/providers/s3/apis/copy.test.ts

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

0 commit comments

Comments
 (0)