Skip to content

Commit c8a3f69

Browse files
committed
cleanup
1 parent 38da4dd commit c8a3f69

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

.github/workflows/build-push.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515

16+
- name: Add INPUT_SHA env var
17+
run: |
18+
export INPUT_SHA=$(git rev-parse ${{ github.event.inputs.ref }})
19+
echo "INPUT_SHA=`echo $INPUT_SHA`" >> $GITHUB_ENV
20+
1621
- name: Install Node ${{ env.NODE_VERSION }}
1722
uses: actions/setup-node@v3
1823
with:
@@ -67,18 +72,28 @@ jobs:
6772
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
6873
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
6974

70-
- name: Get the current release version
75+
- name: Get next release version
7176
if: ${{ github.ref == 'refs/heads/master' }}
72-
id: current-version
73-
run: |
74-
current_version=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r .tag_name)
75-
echo "Current version is $current_version"
76-
echo "result=$current_version" >> $GITHUB_OUTPUT
77+
uses: actions/github-script@v7
78+
id: next-version
79+
with:
80+
result-encoding: string
81+
script: |
82+
const getNextVersion = require('./.branch-github-actions/custom-scripts/next-version');
83+
const nextVersion = await getNextVersion({
84+
core,
85+
github,
86+
context,
87+
sha: process.env.INPUT_SHA,
88+
});
89+
return nextVersion;
90+
env:
91+
INPUT_SHA: ${{ env.INPUT_SHA }}
7792

7893
- name: Write version to files
7994
if: ${{ github.ref == 'refs/heads/master' }}
8095
run: |
81-
./deployment/write-versions.sh ${{ steps.current-version.outputs.result }}
96+
./deployment/write-versions.sh ${{ steps.next-version.outputs.result }}
8297
8398
- name: Deploy updated builds to staging
8499
if: ${{ github.ref == 'refs/heads/master' }}

.github/workflows/deploy-release.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,6 @@ jobs:
6868
- name: Configure NPM
6969
run: npm ci
7070

71-
# Staging should currently already have this built code as we deploy
72-
# to stage on master merge.
73-
# However, we deploy again to stage to send the updated release numbers.
74-
- name: Release to stage
75-
run: |
76-
./deployment/deploy-qa.sh ${{ steps.next-version.outputs.result }}
77-
7871
- name: Release to npm, s3, prod
7972
run: |
8073
./deployment/release.sh ${{ steps.next-version.outputs.result }}

0 commit comments

Comments
 (0)