mirror of
https://github.com/versia-pub/api.git
synced 2025-12-06 08:28:19 +01:00
ci: 👷 Add more jobs to CI
This commit is contained in:
parent
737c8515da
commit
d8b6dddfe1
23
.github/workflows/build.yml
vendored
Normal file
23
.github/workflows/build.yml
vendored
Normal 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
|
||||||
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
|
|
@ -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
37
.github/workflows/test-publish.yml
vendored
Normal 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
26
.github/workflows/tests.yml
vendored
Normal 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
|
||||||
Loading…
Reference in a new issue