Setup Release Candidate #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Setup Release Candidate | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| commitId: | |
| description: 'Commit ID to create RC from' | |
| required: true | |
| type: string | |
| jobs: | |
| setup-rc: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ inputs.commitId }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| persist-credentials: true | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Generate Branch Name | |
| id: branch-name | |
| run: | | |
| echo "BRANCH_NAME=release/rc-$(date +%Y%m%d)" >> $GITHUB_OUTPUT | |
| - name: Create RC Branch | |
| env: | |
| BRANCH_NAME: ${{ steps.branch-name.outputs.BRANCH_NAME }} | |
| run: | | |
| git config user.name "aws-toolkit-automation" | |
| git config user.email "<>" | |
| # Create RC branch from specified commit | |
| git checkout -b $BRANCH_NAME | |
| # Push RC branch | |
| git push origin $BRANCH_NAME |