Skip to content

Commit

Permalink
chore: updating build process (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
kulak-at authored Mar 10, 2024
1 parent b26c5ce commit 68f5f88
Show file tree
Hide file tree
Showing 11 changed files with 5,213 additions and 3,423 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/spotty-pillows-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@midival/core": patch
---

updating build process
76 changes: 0 additions & 76 deletions .github/workflows/deploy.yml

This file was deleted.

40 changes: 16 additions & 24 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install node_modules
run: yarn install --frozen-lockfile
node-version: 21.x
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- name: Compile
run: yarn docs
run: pnpm run docs
- name: Upload docs folder
uses: actions/upload-artifact@v1
with:
Expand All @@ -37,19 +33,15 @@ jobs:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
steps:
- uses: actions/checkout@v1
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install node_modules
run: yarn install --frozen-lockfile
- name: Download math result for job 1
node-version: 21.x
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- name: Download artifacts
uses: actions/download-artifact@v1
with:
name: docs
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish
on:
workflow_run:
workflows: [CI]
branches: [main]
types: [completed]

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
contents: write
pull-requests: write

jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 21.x
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
45 changes: 15 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install node_modules
run: yarn install --frozen-lockfile
- name: Run tests
run: yarn test
node-version: 21.x
cache: "pnpm"
- run: pnpm install --frozen-lockfile
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
- uses: pnpm/action-setup@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install node_modules
run: yarn install --frozen-lockfile
- name: Compile
run: yarn compile
- name: Upload dist folder
uses: actions/upload-artifact@v1
version: 8
- uses: actions/setup-node@v4
with:
name: dist
path: dist/
node-version: 21.x
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- name: Compile
run: pnpm build
20 changes: 14 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,40 @@
"version": "0.1.6",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"module": "dist/index.mjs",
"license": "MIT",
"exports": {
".": "./dist/index.js",
"./mpe": "./dist/mpe.js"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.16",
"@types/node": "^20.11.25",
"@types/webmidi": "^2.0.10",
"gh-pages": "^6.1.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"prettier": "^3.2.4",
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
"typedoc": "^0.25.7",
"typescript": "^5.3.3"
"tsup": "^8.0.2",
"typedoc": "^0.25.11",
"typescript": "^5.4.2"
},
"scripts": {
"compile": "tsc",
"build": "tsup src/index.ts src/mpe.ts --format cjs,esm --dts",
"release": "pnpm run build && changeset publish",
"lint": "tsc",
"test": "jest",
"prettier": "prettier --check \"src/**/*.ts\"",
"prettier:fix": "prettier --write \"src/**/*.ts\"",
"docs": "typedoc",
"deploy": "gh-pages -d docs"
},
"dependencies": {
"@hypersphere/omnibus": "^0.1.4"
"@hypersphere/omnibus": "^0.1.6"
},
"publishConfig": {
"access": "public"
}
}
Loading

0 comments on commit 68f5f88

Please # to comment.