From ddcc50d97298b9d7e3d41418e8c6c4fc5a87eae1 Mon Sep 17 00:00:00 2001 From: Jialecl Date: Wed, 27 May 2026 13:11:39 +0200 Subject: [PATCH 1/3] Testing workflow change --- .github/workflows/pull-request.yml | 34 ++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 66022d185a..d14f323190 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,6 +1,11 @@ -name: Build and test +name: Publish Next Version -on: pull_request +on: + push: + branches: + - master + paths: + - "packages/lib/**" jobs: build: @@ -16,10 +21,22 @@ jobs: node-version: 22.x registry-url: https://registry.npmjs.org/ + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + role-to-assume: ${{ secrets.AWS_ROLE_SANDBOX }} + role-duration-seconds: 3600 + role-skip-session-tagging: true + - name: Install dependencies run: npm install - name: Build library and website + env: + NEXT_PUBLIC_SITE_VERSION: next run: npm run build - name: Test library @@ -27,3 +44,16 @@ jobs: - name: Test library accessibility run: npm run test:accessibility + + - name: Publish NEXT version to npm + run: | + sed -i "s#\"version\": \".*\"#\"version\": \"$(jq -r .version ./packages/lib/package.json)-${GITHUB_SHA:0:7}\"#" ./packages/lib/package.json + cd packages/lib + npm publish --tag next --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} + + - name: Move NEXT website to S3 + run: | + aws s3 rm s3://design-system-react-cdk-site-tmp/halstack/next/ --recursive + aws s3 cp ./apps/website/out/ s3://design-system-react-cdk-site-tmp/halstack/next/ --recursive From 07f806ef0f18f3d9178064f0c44e59a8ecf48402 Mon Sep 17 00:00:00 2001 From: Jialecl Date: Wed, 27 May 2026 13:13:47 +0200 Subject: [PATCH 2/3] reverting workflow name and trigger --- .github/workflows/pull-request.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index d14f323190..f5b136be3d 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,11 +1,6 @@ -name: Publish Next Version - -on: - push: - branches: - - master - paths: - - "packages/lib/**" +name: Build and test + +on: pull_request jobs: build: From c5d1baece11a5ad066db7f42d5c0fca08ff30d72 Mon Sep 17 00:00:00 2001 From: Jialecl Date: Wed, 27 May 2026 13:47:15 +0200 Subject: [PATCH 3/3] Change secret variable --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index f5b136be3d..1dbf898229 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -22,7 +22,7 @@ jobs: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-west-2 - role-to-assume: ${{ secrets.AWS_ROLE_SANDBOX }} + role-to-assume: ${{ secrets.AWS_ROLE_PROD }} role-duration-seconds: 3600 role-skip-session-tagging: true