Skip to content

Commit

Permalink
chore: fix changelog generation (#1817)
Browse files Browse the repository at this point in the history
* chore: fix workflows to use the appropraite commit for checkout

* chore: fix version target to push changes at the end
  • Loading branch information
saikumarrs authored Aug 1, 2024
1 parent 6f120aa commit 815b9bf
Show file tree
Hide file tree
Showing 15 changed files with 51 additions and 18 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.sha }}

- name: Get new version number
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-sanity-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}

- name: Configure deployment options
id: deployment-options
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ on:
type: string
required: false
default: ''
use_pr_head_sha:
type: string
default: 'false'
secrets:
AWS_ACCOUNT_ID:
required: true
Expand Down Expand Up @@ -63,8 +66,21 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_S3_SYNC_ROLE }}
aws-region: us-east-1

- name: Determine checkout SHA
id: getSHA
run: |
if ${{ inputs.use_pr_head_sha }} == 'true'; then
sha=$(echo ${{ github.event.pull_request.head.sha }})
else
sha=$(echo ${{ github.sha }})
fi
echo "Checkout SHA: $sha"
echo "SHA=$sha" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ steps.getSHA.outputs.SHA }}

- name: Get new version number
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.sha }}

# In order to make a commit, we need to initialize a user.
# You may choose to write something less generic here if you want, it doesn't matter functionality wise.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup Node
uses: actions/setup-node@v4
Expand Down Expand Up @@ -43,6 +45,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup Node
uses: actions/setup-node@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unit-tests-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup Node
uses: actions/setup-node@v4
Expand Down
5 changes: 3 additions & 2 deletions packages/analytics-js-common/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
"executor": "@jscutlery/semver:version",
"options": {
"baseBranch": "main",
"preset": "conventional",
"preset": "conventionalcommits",
"tagPrefix": "{projectName}@",
"trackDeps": true
"trackDeps": true,
"push": true
}
},
"github": {
Expand Down
5 changes: 3 additions & 2 deletions packages/analytics-js-cookies/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
"executor": "@jscutlery/semver:version",
"options": {
"baseBranch": "main",
"preset": "conventional",
"preset": "conventionalcommits",
"tagPrefix": "{projectName}@",
"trackDeps": true
"trackDeps": true,
"push": true
}
},
"github": {
Expand Down
5 changes: 3 additions & 2 deletions packages/analytics-js-integrations/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
"executor": "@jscutlery/semver:version",
"options": {
"baseBranch": "main",
"preset": "conventional",
"preset": "conventionalcommits",
"tagPrefix": "{projectName}@",
"trackDeps": true
"trackDeps": true,
"push": true
}
},
"github": {
Expand Down
5 changes: 3 additions & 2 deletions packages/analytics-js-plugins/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
"executor": "@jscutlery/semver:version",
"options": {
"baseBranch": "main",
"preset": "conventional",
"preset": "conventionalcommits",
"tagPrefix": "{projectName}@",
"trackDeps": true
"trackDeps": true,
"push": true
}
},
"github": {
Expand Down
5 changes: 3 additions & 2 deletions packages/analytics-js-service-worker/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
"executor": "@jscutlery/semver:version",
"options": {
"baseBranch": "main",
"preset": "conventional",
"preset": "conventionalcommits",
"tagPrefix": "{projectName}@",
"trackDeps": true
"trackDeps": true,
"push": true
}
},
"github": {
Expand Down
5 changes: 3 additions & 2 deletions packages/analytics-js/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@
"executor": "@jscutlery/semver:version",
"options": {
"baseBranch": "main",
"preset": "conventional",
"preset": "conventionalcommits",
"tagPrefix": "{projectName}@",
"trackDeps": true
"trackDeps": true,
"push": true
}
},
"github": {
Expand Down
5 changes: 3 additions & 2 deletions packages/analytics-v1.1/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@
"executor": "@jscutlery/semver:version",
"options": {
"baseBranch": "main",
"preset": "conventional",
"preset": "conventionalcommits",
"tagPrefix": "{projectName}@",
"trackDeps": true
"trackDeps": true,
"push": true
}
},
"github": {
Expand Down
5 changes: 3 additions & 2 deletions packages/loading-scripts/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
"executor": "@jscutlery/semver:version",
"options": {
"baseBranch": "main",
"preset": "conventional",
"preset": "conventionalcommits",
"tagPrefix": "{projectName}@",
"trackDeps": true
"trackDeps": true,
"push": true
}
},
"github": {
Expand Down
5 changes: 3 additions & 2 deletions packages/sanity-suite/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
"executor": "@jscutlery/semver:version",
"options": {
"baseBranch": "main",
"preset": "conventional",
"preset": "conventionalcommits",
"tagPrefix": "{projectName}@",
"trackDeps": true
"trackDeps": true,
"push": true
}
}
}
Expand Down

0 comments on commit 815b9bf

Please sign in to comment.