Skip to content

Commit 00dce04

Browse files
author
Ashwin Kumar
committed
add new gh workflow to test lerna on fork
1 parent ba23347 commit 00dce04

File tree

5 files changed

+59
-39
lines changed

5 files changed

+59
-39
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ runs:
3131
git config --global user.name $GITHUB_USER
3232
3333
- name: Run npm publish
34-
if: github.repository_owner == 'aws-amplify'
34+
# if: github.repository_owner == 'aws-amplify'
3535
shell: bash
3636
working-directory: ./amplify-js
3737
env:

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

Lines changed: 43 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -23,54 +23,61 @@ jobs:
2323
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2424
with:
2525
path: amplify-js
26-
token: ${{ secrets.GH_TOKEN_AMPLIFY_JS_WRITE }}
26+
# token: ${{ secrets.GH_TOKEN_AMPLIFY_JS_WRITE }}
2727

2828
- name: Setup node and build the repository
2929
uses: ./amplify-js/.github/actions/node-and-build
3030

31+
###
32+
# TODO Remove this to enable real NPM interactions.
33+
# <remove>
34+
- name: Load Verdaccio with AmplifyJs
35+
uses: ./amplify-js/.github/actions/load-verdaccio-with-amplify-js
36+
### </remove>
37+
3138
- name: Run npm publish
3239
uses: ./amplify-js/.github/actions/npm-publish
3340
with:
34-
target: release
41+
target: ashwin
3542
npm_token: ${{ secrets.NPM_TOKEN }}
3643
github_user: ${{ vars.GH_USER}}
3744
github_email: ${{ vars.GH_EMAIL}}
3845

39-
- name: Set github commit user
40-
env:
41-
GITHUB_EMAIL: ${{ vars.GH_EMAIL }}
42-
GITHUB_USER: ${{ vars.GH_USER }}
43-
run: |
44-
git config --global user.email $GITHUB_EMAIL
45-
git config --global user.name $GITHUB_USER
46+
# - name: Set github commit user
47+
# env:
48+
# GITHUB_EMAIL: ${{ vars.GH_EMAIL }}
49+
# GITHUB_USER: ${{ vars.GH_USER }}
50+
# run: |
51+
# git config --global user.email $GITHUB_EMAIL
52+
# git config --global user.name $GITHUB_USER
4653

47-
- name: Update roll-back infrastructure
48-
working-directory: ./amplify-js
49-
run: |
50-
git pull origin release
51-
PUBLISH_COMMIT_HASH=$(git log -n 1 --pretty=format:"%H")
52-
RELEASE_COMMIT_MESSAGE=$(git log -n 1 --skip 1 --pretty=oneline)
53-
if [[ $RELEASE_COMMIT_MESSAGE = *release\(required\)* ]]; then git tag -f required-release $PUBLISH_COMMIT_HASH; fi
54+
# - name: Update roll-back infrastructure
55+
# working-directory: ./amplify-js
56+
# run: |
57+
# git pull origin release
58+
# PUBLISH_COMMIT_HASH=$(git log -n 1 --pretty=format:"%H")
59+
# RELEASE_COMMIT_MESSAGE=$(git log -n 1 --skip 1 --pretty=oneline)
60+
# if [[ $RELEASE_COMMIT_MESSAGE = *release\(required\)* ]]; then git tag -f required-release $PUBLISH_COMMIT_HASH; fi
5461

55-
- name: Update API documentation
56-
working-directory: ./amplify-js
57-
run: |
58-
yarn run docs
59-
git add ./docs/api/
60-
git commit -m "chore(release): update API docs [skip release]"
62+
# - name: Update API documentation
63+
# working-directory: ./amplify-js
64+
# run: |
65+
# yarn run docs
66+
# git add ./docs/api/
67+
# git commit -m "chore(release): update API docs [skip release]"
6168

62-
- name: Push post release changes to the release branch
63-
working-directory: ./amplify-js
64-
run: |
65-
git push origin release
66-
if [ $(git tag -l "required-release") ]; then git push -f origin required-release; fi
69+
# - name: Push post release changes to the release branch
70+
# working-directory: ./amplify-js
71+
# run: |
72+
# git push origin release
73+
# if [ $(git tag -l "required-release") ]; then git push -f origin required-release; fi
6774

68-
- name: Create a PR to merge temporary release branch into main development branch
69-
working-directory: ./amplify-js
70-
env:
71-
TEMP_BRANCH_NAME: ${{ needs.deploy-prep.outputs.branch_name }}
72-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_AMPLIFY_JS_WRITE }}
73-
run: |
74-
git checkout -b $TEMP_BRANCH_NAME
75-
git push origin $TEMP_BRANCH_NAME
76-
gh pr create -B main -H $TEMP_BRANCH_NAME --title 'chore: Merge release into main' --body 'Merge the recently completed release back into the main development branch. Generated by the callable-npm-publish-release workflow.'
75+
# - name: Create a PR to merge temporary release branch into main development branch
76+
# working-directory: ./amplify-js
77+
# env:
78+
# TEMP_BRANCH_NAME: ${{ needs.deploy-prep.outputs.branch_name }}
79+
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN_AMPLIFY_JS_WRITE }}
80+
# run: |
81+
# git checkout -b $TEMP_BRANCH_NAME
82+
# git push origin $TEMP_BRANCH_NAME
83+
# gh pr create -B main -H $TEMP_BRANCH_NAME --title 'chore: Merge release into main' --body 'Merge the recently completed release back into the main development branch. Generated by the callable-npm-publish-release workflow.'

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CodeQL
33

44
on:
55
push:
6-
branches: ['*']
6+
branches: ['main-dont-run']
77
pull_request:
88
branches: ['main', 'next/main', 'next/release']
99
schedule:
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Push - testing lerna
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
permissions:
11+
contents: write
12+
secrets: inherit
13+
uses: ./.github/workflows/callable-npm-publish-release.yml

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ concurrency:
88
on:
99
push:
1010
branches:
11-
- main
11+
- main-dont-run
1212

1313
jobs:
1414
e2e:

0 commit comments

Comments
 (0)