Skip to content

Commit 6ba6309

Browse files
author
Ashwin Kumar
committed
testing release with actions
1 parent e40d148 commit 6ba6309

File tree

2 files changed

+77
-18
lines changed

2 files changed

+77
-18
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release Workflow
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
newTag:
7+
description: 'The new tag for the release'
8+
required: true
9+
type: string
10+
previousTag:
11+
description: 'The previous tag to compare for generating changelog'
12+
required: true
13+
type: string
14+
gh_token:
15+
description: The github token that gives the job permissions to publish release notes on github
16+
required: true
17+
type: string
18+
19+
jobs:
20+
create-changelog-and-release:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
25+
with:
26+
path: amplify-js
27+
28+
- name: Generate changelog
29+
uses: mikepenz/release-changelog-builder-action@v2
30+
id: changelog
31+
with:
32+
fromTag: ${{ inputs.previousTag }}
33+
toTag: ${{ inputs.newTag }}
34+
35+
- name: Create Release
36+
uses: softprops/action-gh-release@v1
37+
with:
38+
tag_name: ${{ inputs.newTag }}
39+
name: Release ${{ inputs.newTag }}
40+
body: ${{ steps.changelog.outputs.changelog }}
41+
env:
42+
GITHUB_TOKEN: ${{ inputs.gh_token }}

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

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,41 @@ jobs:
1212
with:
1313
path: amplify-js
1414

15-
- name: Setup node and build the repository
16-
uses: ./amplify-js/.github/actions/node-and-build
17-
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-
25-
- name: Run npm publish
26-
uses: ./amplify-js/.github/actions/npm-publish
27-
with:
28-
target: release
29-
npm_token: ${{ secrets.NPM_TOKEN }}
30-
gh_token: ${{ secrets.GITHUB_TOKEN }}
31-
github_user: ${{ vars.GH_USER}}
32-
github_email: ${{ vars.GH_EMAIL}}
15+
- name: testing aws-amplify version
16+
working-directory: ./amplify-js
17+
run: |
18+
npm install -g lerna
19+
lerna list --json | jq -r '.[] | select(.name=="aws-amplify") | .version'
20+
echo "aws-amplify-prev-version=$(lerna list --json | jq -r '.[] | select(.name == "aws-amplify") | .version')" >> $GITHUB_ENV
21+
echo "The version of 'aws-amplify' is $aws-amplify-prev-version"
22+
23+
# - name: Setup node and build the repository
24+
# uses: ./amplify-js/.github/actions/node-and-build
25+
26+
# ###
27+
# # TODO Remove this to enable real NPM interactions.
28+
# # <remove>
29+
# - name: Load Verdaccio with AmplifyJs
30+
# uses: ./amplify-js/.github/actions/load-verdaccio-with-amplify-js
31+
# ### </remove>
32+
33+
# - name: Run npm publish
34+
# uses: ./amplify-js/.github/actions/npm-publish
35+
# with:
36+
# target: release
37+
# npm_token: ${{ secrets.NPM_TOKEN }}
38+
# gh_token: ${{ secrets.GITHUB_TOKEN }}
39+
# github_user: ${{ vars.GH_USER}}
40+
# github_email: ${{ vars.GH_EMAIL}}
41+
42+
# - name: Run gh release
43+
# uses: ./.github/workflows/callable-gh-publish-release.yml
44+
# with:
45+
# newTag: ubuntu-latest
46+
# previousTag: ubuntu-latest
47+
# gh_token: ${{ secrets.GITHUB_TOKEN }}
48+
49+
# ################################################################################################################
3350

3451
# - name: Set github commit user
3552
# env:

0 commit comments

Comments
 (0)