Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bredmond5 committed Nov 7, 2024
1 parent 38da4dd commit c8a3f69
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ jobs:
steps:
- uses: actions/checkout@v4

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

- name: Get the current release version
- name: Get next release version
if: ${{ github.ref == 'refs/heads/master' }}
id: current-version
run: |
current_version=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r .tag_name)
echo "Current version is $current_version"
echo "result=$current_version" >> $GITHUB_OUTPUT
uses: actions/github-script@v7
id: next-version
with:
result-encoding: string
script: |
const getNextVersion = require('./.branch-github-actions/custom-scripts/next-version');
const nextVersion = await getNextVersion({
core,
github,
context,
sha: process.env.INPUT_SHA,
});
return nextVersion;
env:
INPUT_SHA: ${{ env.INPUT_SHA }}

- name: Write version to files
if: ${{ github.ref == 'refs/heads/master' }}
run: |
./deployment/write-versions.sh ${{ steps.current-version.outputs.result }}
./deployment/write-versions.sh ${{ steps.next-version.outputs.result }}
- name: Deploy updated builds to staging
if: ${{ github.ref == 'refs/heads/master' }}
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ jobs:
- name: Configure NPM
run: npm ci

# Staging should currently already have this built code as we deploy
# to stage on master merge.
# However, we deploy again to stage to send the updated release numbers.
- name: Release to stage
run: |
./deployment/deploy-qa.sh ${{ steps.next-version.outputs.result }}
- name: Release to npm, s3, prod
run: |
./deployment/release.sh ${{ steps.next-version.outputs.result }}
Expand Down

0 comments on commit c8a3f69

Please sign in to comment.