-
Notifications
You must be signed in to change notification settings - Fork 793
55 lines (45 loc) · 1.63 KB
/
setup-release-candidate.yml
File metadata and controls
55 lines (45 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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: Install dependencies
run: npm ci
- name: Generate license attribution
run: npm run scan-licenses
- 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
# Add generated license files
git add LICENSE-THIRD-PARTY
git commit -m "Update third-party license attribution for $BRANCH_NAME"
# Push RC branch
git push origin $BRANCH_NAME