Skip to content

Commit 5fb7188

Browse files
authored
chore: Parallel release action for components package (#1414)
1 parent 715264b commit 5fb7188

File tree

1 file changed

+70
-4
lines changed

1 file changed

+70
-4
lines changed

.github/workflows/release.yml

Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,74 @@ permissions:
1313
contents: read
1414

1515
jobs:
16+
unitTest:
17+
name: Components unit tests
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Use Node.js 16
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: 16
25+
- run: npm install --force
26+
- run: npm run build
27+
- run: npm run test:unit
28+
29+
integTest:
30+
name: Components integ tests
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v3
34+
- name: Use Node.js 16
35+
uses: actions/setup-node@v3
36+
with:
37+
node-version: 16
38+
- run: npm install --force
39+
- run: npm run build
40+
- run: npm run test:integ
41+
42+
a11yTest:
43+
name: Components a11y tests
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v3
47+
- name: Use Node.js 16
48+
uses: actions/setup-node@v3
49+
with:
50+
node-version: 16
51+
- run: npm install --force
52+
- run: npm run build
53+
- run: npm run test:a11y
54+
1655
release:
17-
uses: cloudscape-design/.github/.github/workflows/release.yml@main
18-
secrets: inherit
19-
with:
20-
publish-packages: lib/components,lib/design-tokens,lib/style-dictionary,lib/components-themeable,lib/dev-pages,lib/components-definitions
56+
concurrency: release-${{ github.ref }}
57+
runs-on: ubuntu-latest
58+
needs:
59+
- unitTest
60+
- integTest
61+
- a11yTest
62+
steps:
63+
- uses: actions/checkout@v3
64+
- name: Use Node.js 16
65+
uses: actions/setup-node@v3
66+
with:
67+
node-version: 16
68+
- run: npm install --force
69+
- run: npm run build
70+
71+
- name: Configure AWS Credentials
72+
uses: aws-actions/configure-aws-credentials@v2
73+
with:
74+
role-to-assume: ${{ secrets.AWS_CODEARTIFACT_ROLE }}
75+
aws-region: us-west-2
76+
- name: Login and configure codeartifact
77+
env:
78+
CODE_ARTIFACT_REPO: ${{ startsWith(github.ref_name, 'dev-v3-') && format('AwsUI-Artifacts-{0}', github.ref_name) || 'github-artifacts' }}
79+
run: |
80+
echo Logging into repository $CODE_ARTIFACT_REPO
81+
aws codeartifact login --tool npm --repository $CODE_ARTIFACT_REPO --domain awsui --domain-owner ${{ secrets.AWS_ACCOUNT_ID }} --region us-west-2 --namespace @cloudscape-design
82+
83+
- name: Release package to private CodeArtifact
84+
uses: cloudscape-design/.github/.github/actions/release-package@main
85+
with:
86+
publish-packages: lib/components,lib/design-tokens,lib/style-dictionary,lib/components-themeable,lib/dev-pages,lib/components-definitions

0 commit comments

Comments
 (0)