Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,11 @@ permissions:
contents: read
id-token: write

on:
pull_request:
workflow_call:
inputs:
branch:
description: "Branch to checkout"
required: false
default: master
type: string
on: [pull_request, workflow_call]

jobs:
shared-ci:
uses: ./.github/workflows/shared-ci.yml
with:
branch: ${{ inputs.branch || 'master' }}
pr-ci-all-required:
if: always()
needs:
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/prod-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ on:
description: 'NPM distribution tag'
required: false
default: 'latest'
branch:
description: 'The branch to release from'
required: false
default: 'master'

env:
NODE_OPTIONS: "--max-old-space-size=4096"
Expand All @@ -35,6 +31,12 @@ jobs:
needs: [pre-release-ci]
environment: release
steps:
- name: Require a branch
if: github.ref_type != 'branch'
run: |
echo "::error::Dispatch this workflow from a branch (got ${{ github.ref_type }} '${{ github.ref_name }}'). To release a specific commit, point a branch at it first."
exit 1

- name: Checkout code
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -76,11 +78,11 @@ jobs:

- name: Configure git
env:
BRANCH: ${{ github.event.inputs.branch }}
BRANCH: ${{ github.ref_name }}
run: |
git config --global user.name "aws-crypto-tools-ci-bot"
git config --global user.email "no-reply@noemail.local"
Comment on lines 80 to 84
git checkout $BRANCH
git checkout "$BRANCH"

- name: Version packages
env:
Expand All @@ -96,9 +98,10 @@ jobs:
needs: [pre-release-ci, version]
environment: release
steps:
# Include the version-bump commit the version job pushed
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
ref: ${{ github.ref_name }}

- uses: actions/setup-node@v4
with:
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/shared-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ name: Shared CI Tests
on:
workflow_call:
inputs:
branch:
description: "Branch to checkout"
required: false
default: master
type: string
test-published-packages:
description: 'Test against published packages instead of checked out code'
required: false
Expand Down Expand Up @@ -39,7 +34,6 @@ jobs:
# Always need repo for test scripts and configuration, even when testing published packages
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
fetch-depth: 0
submodules: true

Expand Down
Loading