Skip to content

Commit

Permalink
ci: break into steps
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed Apr 9, 2024
1 parent 8c43d44 commit 756b671
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ jobs:
with:
bun-version: 1.1.3

- name: Build and test the library
- name: Install dependencies
run: |
bun install
bun run playwright install --with-deps
bun build:lib
bun test:unit
bun test:e2e
bun playwright install --with-deps
- name: Build library
run: bun build:lib

- name: Run unit tests
run: bun test:unit

- name: Run e2e tests
run: bun test:e2e
18 changes: 15 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,31 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"

- uses: oven-sh/setup-bun@v1
with:
bun-version: 1.1.3

- name: Install dependencies
run: bun install

- name: Build library
run: bun build:lib

- name: Build package
run: bun build:package

- name: Publish package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

# Currently, only npm supports publishing packages with provenance
# https://docs.npmjs.com/generating-provenance-statements
run: |
npm install --force
node scripts
node scripts/npm-package
cd package
npm publish --provenance --access public

0 comments on commit 756b671

Please sign in to comment.