ci: 👷 Add more jobs to CI

This commit is contained in:
Jesse Wierzbinski 2024-08-24 15:16:19 +02:00
parent 737c8515da
commit d8b6dddfe1
No known key found for this signature in database
4 changed files with 87 additions and 1 deletions

23
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,23 @@
name: Test Build
on:
push:
permissions:
contents: read
# For provenance generation
id-token: write
jobs:
# Build job
build:
runs-on: ubuntu-latest
environment: NPM Deploy
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Build
run: bun install && bun run build

View file

@ -1,4 +1,4 @@
name: Build & Publish NPM Package name: Build & Publish Package
on: on:
# Allows you to run this workflow manually from the Actions tab # Allows you to run this workflow manually from the Actions tab

37
.github/workflows/test-publish.yml vendored Normal file
View file

@ -0,0 +1,37 @@
name: Test Publish
on:
push:
permissions:
contents: read
# For provenance generation
id-token: write
jobs:
# Build job
build:
runs-on: ubuntu-latest
environment: NPM Deploy
strategy:
matrix:
package: ["federation", "client"]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install
run: cd ${{ matrix.package }} && bun install
- name: Build
run: bun run Build
- name: Publish to NPM
run: npm publish --dry-run
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish to JSR
run: bunx jsr publish --allow-slow-types --allow-dirty --dry-run

26
.github/workflows/tests.yml vendored Normal file
View file

@ -0,0 +1,26 @@
name: Run Tests
on:
push:
permissions:
contents: read
# For provenance generation
id-token: write
jobs:
# Build job
build:
runs-on: ubuntu-latest
environment: NPM Deploy
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install
run: bun install
- name: Test
run: bun run test