mirror of
https://github.com/Blah-IM/typescript-core.git
synced 2025-06-23 16:31:08 +00:00
ci: Split workflows into test and conditional publishing
This commit is contained in:
parent
45d74bc024
commit
9106b78d00
2 changed files with 30 additions and 3 deletions
7
.github/workflows/publish.yml
vendored
7
.github/workflows/publish.yml
vendored
|
@ -1,9 +1,10 @@
|
|||
name: Test & Publish on JSR & npm
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_run:
|
||||
workflows: ["Test"]
|
||||
types:
|
||||
- completed
|
||||
jobs:
|
||||
testAndPublish:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
26
.github/workflows/test.yml
vendored
Normal file
26
.github/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
jobs:
|
||||
testAndPublish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22.x"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
- uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build & Test
|
||||
run: pnpm build && pnpm test
|
Loading…
Add table
Reference in a new issue