Skip to content

Commit 10db686

Browse files
committed
chore: refactor
1 parent 5184d19 commit 10db686

2 files changed

Lines changed: 13 additions & 58 deletions

File tree

.github/actions/setup/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ runs:
2828
with:
2929
run_install: false
3030

31-
- uses: actions/setup-node@v4
31+
- uses: actions/setup-node@v5
3232
with:
3333
node-version-file: ${{ inputs.node-version-file }}
3434
cache: 'pnpm'
@@ -45,6 +45,8 @@ runs:
4545
- name: Nx Cloud start
4646
run: pnpm dlx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e-ci" --with-env-vars="CODECOV_TOKEN"
4747
shell: bash
48+
env:
49+
CODECOV_TOKEN: ${{ env.CODECOV_TOKEN }}
4850

4951
- name: Cache Playwright browsers
5052
uses: actions/cache@v4

.github/workflows/publish.yml

Lines changed: 10 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ jobs:
3737
publish-or-pr:
3838
if: github.event_name == 'push'
3939
permissions:
40-
contents: write # changesets/action
40+
contents: write
4141
issues: write
4242
pull-requests: write
43-
id-token: write # OIDC for provenance if npm publish happens here
43+
id-token: write
4444
runs-on: ubuntu-latest
4545
steps:
4646
- name: Setup Project
@@ -54,18 +54,9 @@ jobs:
5454
with:
5555
node-version-file: '.node-version'
5656
pnpm-cache-folder: .pnpm-store
57+
env:
58+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5759

58-
- run: pnpm exec nx affected -t build lint test e2e-ci
59-
60-
- uses: actions/upload-artifact@v4
61-
if: ${{ !cancelled() }}
62-
with:
63-
name: playwright-report
64-
path: |
65-
./**/.playwright/**
66-
retention-days: 30
67-
68-
- run: git status
6960
- name: publish
7061
uses: changesets/action@v1
7162
id: changesets
@@ -80,9 +71,6 @@ jobs:
8071
HOME: ${{ github.workspace }}
8172
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
8273

83-
- run: pnpm pkg-pr-new publish './packages/*' './packages/sdk-effects/*' --packageManager=pnpm --comment=off
84-
if: steps.changesets.outputs.published == 'false'
85-
8674
- name: Publish Release Steps
8775
if: steps.changesets.outputs.published == 'true'
8876
uses: ./.github/actions/publish-release
@@ -130,51 +118,16 @@ jobs:
130118
env:
131119
HUSKY: 0
132120
steps:
133-
- uses: actions/checkout@v4
121+
- name: Setup Project
122+
uses: ./.github/actions/setup
134123
with:
135124
fetch-depth: 0
136125
ref: ${{ inputs.branch }}
137-
- uses: pnpm/action-setup@v4
138-
with:
139-
run_install: false
140-
- uses: actions/setup-node@v5
141-
with:
126+
token: ${{ secrets.GH_TOKEN }}
142127
node-version-file: '.node-version'
143-
cache: 'pnpm'
144-
145-
- name: Update npm
146-
run: npm install -g npm@latest
147-
148-
- run: pnpm install --frozen-lockfile
149-
150-
- run: pnpm dlx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e-ci" --with-env-vars="CODECOV_TOKEN"
151-
152-
- name: Cache Playwright browsers
153-
uses: actions/cache@v4
154-
with:
155-
path: ~/.cache/ms-playwright
156-
key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }}
157-
restore-keys: |
158-
${{ runner.os }}-playwright-
159-
160-
- run: pnpm exec playwright install
161-
162-
- uses: nrwl/nx-set-shas@v4
163-
with:
164-
main-branch-name: main
165-
166-
- name: setup pnpm config
167-
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
168-
169-
- run: pnpm exec nx run-many -t build test e2e-ci
170-
171-
- uses: actions/upload-artifact@v4
172-
if: ${{ !cancelled() }}
173-
with:
174-
name: playwright-report
175-
path: |
176-
./**/.playwright/**
177-
retention-days: 30
128+
pnpm-cache-folder: .pnpm-store
129+
env:
130+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
178131

179132
- name: Version Packages as prerelease
180133
run: pnpm changeset version --snapshot ${{ inputs.prerelease }}

0 commit comments

Comments
 (0)