Skip to content

Commit beddc88

Browse files
committed
ci: better github workflows for npm publish
1 parent 75ca59e commit beddc88

File tree

14 files changed

+701
-114
lines changed

14 files changed

+701
-114
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/beige-ideas-carry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"mobx-tanstack-query": patch
3+
---
4+
5+
ci: better github workflows for npm publish

.changeset/config.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{ "repo": "js2me/mobx-tanstack-query" }
6+
],
7+
"commit": false,
8+
"fixed": [],
9+
"linked": [],
10+
"access": "restricted",
11+
"baseBranch": "master",
12+
"updateInternalDependencies": "patch",
13+
"ignore": []
14+
}

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: js2me

.github/workflows/build.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/docs.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy typedoc to Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
permissions: read-all
10+
11+
concurrency:
12+
group: pages
13+
cancel-in-progress: true
14+
15+
jobs:
16+
deploy:
17+
environment:
18+
name: github-pages
19+
url: ${{ steps.deployment.outputs.page_url }}
20+
permissions:
21+
contents: read
22+
pages: write
23+
id-token: write
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout tree
27+
uses: actions/checkout@v4
28+
29+
- name: Set-up Node.js
30+
uses: actions/setup-node@v4
31+
with:
32+
check-latest: true
33+
node-version-file: .nvmrc
34+
35+
- run: corepack enable
36+
37+
- run: pnpm i
38+
39+
- run: pnpm docs:build
40+
41+
- name: Set-up Pages
42+
uses: actions/configure-pages@v5
43+
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v3
46+
with:
47+
path: docs/.vitepress/dist
48+
49+
- name: Deploy odoc to GitHub Pages
50+
uses: actions/deploy-pages@v4
51+
id: deployment

.github/workflows/github-pages.yaml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Builds, tests & co
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
permissions: read-all
8+
9+
jobs:
10+
build-and-test:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
node-version: [24, 22, 20]
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout tree
18+
uses: actions/checkout@v4
19+
20+
- name: Set-up Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
check-latest: true
24+
node-version: ${{ matrix.node-version }}
25+
26+
- run: corepack enable
27+
28+
- run: pnpm i
29+
30+
- run: pnpm check
31+
32+
- run: pnpm build
33+
34+
- run: pnpm test

.github/workflows/test.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Version or Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
concurrency: ${{ github.workflow }}
9+
10+
permissions: read-all
11+
12+
jobs:
13+
release:
14+
if: ${{ github.repository_owner == 'js2me' }}
15+
permissions:
16+
contents: write # to create release
17+
id-token: write # to generate provenance
18+
issues: write # to post issue comments
19+
pull-requests: write # to create pull request
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout tree
23+
uses: actions/checkout@v4
24+
25+
- name: Set-up Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
check-latest: true
29+
node-version-file: .nvmrc
30+
31+
- run: corepack enable
32+
- run: pnpm i
33+
34+
- name: Create Release Pull Request
35+
uses: changesets/action@v1
36+
with:
37+
version: pnpm changeset version
38+
publish: pnpm pub
39+
env:
40+
GITHUB_TOKEN: ${{ github.token }}
41+
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)