6 Commits

Author SHA1 Message Date
Morten Olsen
6f485f90e4 ci: deployment fixes 2023-09-06 13:10:12 +02:00
Morten Olsen
b01ce539b7 chore: package rename 2023-09-06 13:06:52 +02:00
Morten Olsen
69a6b23455 chore: publish as public packages 2023-09-06 13:00:16 +02:00
Morten Olsen
5de1f0ce1d chore: trying to ensure packages gets published 2023-09-06 12:57:39 +02:00
Morten Olsen
23ebca5bb4 chore: updated release pipeline 2023-09-06 12:09:26 +02:00
Morten Olsen
2119d60a42 Update release-package.yml 2023-09-06 11:43:06 +02:00
10 changed files with 44 additions and 26 deletions

View File

@@ -33,6 +33,8 @@ jobs:
- run: | - run: |
pnpm install pnpm install
pnpm run build pnpm run build
env:
ASSET_URL: https://mortenolsen.pro/bob
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: lib name: lib
@@ -42,6 +44,12 @@ jobs:
packages/*/package.json packages/*/package.json
package.json package.json
README.md README.md
- uses: actions/upload-artifact@v3
with:
name: web
retention-days: 5
path: |
packages/playground/dist
update-release-draft: update-release-draft:
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
needs: build needs: build
@@ -62,21 +70,18 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [build, update-release-draft] needs: [build, update-release-draft]
permissions: permissions:
contents: write pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps: steps:
- uses: actions/checkout@v3 - name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
with: with:
fetch-depth: 0 artifact_name: web
- uses: actions/download-artifact@v3
with:
name: lib
path: ./
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: packages/playground/dist
release-npm: release-npm:
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -103,7 +108,7 @@ jobs:
pnpm install pnpm install
git config user.name "Github Actions Bot" git config user.name "Github Actions Bot"
git config user.email "<>" git config user.email "<>"
pnpm version $(git describe --tag --abbrev=0) --no-git-tag-version pnpm version $(git describe --tag --abbrev=0)
pnpm publish --no-git-checks -r pnpm publish -r --publish-branch main --access public
env: env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@@ -13,6 +13,6 @@
"start": "turbo start", "start": "turbo start",
"test": "turbo test" "test": "turbo test"
}, },
"version": "0.0.1", "version": "0.1.8",
"name": "@bob-the-algorithm/repo" "name": "@bob-the-algorithm/repo"
} }

View File

@@ -18,8 +18,9 @@
"files": [ "files": [
"dist/**/*" "dist/**/*"
], ],
"private": false,
"main": "./dist/cjs/index.js", "main": "./dist/cjs/index.js",
"name": "bob-the-algorithm", "name": "@bob-the-algorithm/core",
"scripts": { "scripts": {
"build": "tsc --build configs/tsconfig.libs.json" "build": "tsc --build configs/tsconfig.libs.json"
}, },

View File

@@ -1,5 +1,5 @@
{ {
"name": "@bob-the-algorithm/config", "name": "@bob-the-algorithm/config",
"private": true, "private": false,
"version": "0.0.1" "version": "0.0.1"
} }

View File

@@ -10,13 +10,14 @@
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"bob-the-algorithm": "workspace:^", "@bob-the-algorithm/core": "workspace:^",
"date-fns": "^2.30.0", "date-fns": "^2.30.0",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0" "react-dom": "^18.2.0"
}, },
"devDependencies": { "devDependencies": {
"@mdx-js/rollup": "^2.3.0", "@mdx-js/rollup": "^2.3.0",
"@types/node": "^20.5.9",
"@types/react": "^18.2.15", "@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7", "@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/eslint-plugin": "^6.0.0",

View File

@@ -1,4 +1,4 @@
import { calulation, plugins } from 'bob-the-algorithm'; import { calulation, plugins } from '@bob-the-algorithm/core';
import { createWorker } from '../../features/runner/worker'; import { createWorker } from '../../features/runner/worker';
import { convertResult } from '../../utils/graph'; import { convertResult } from '../../utils/graph';

View File

@@ -1,4 +1,4 @@
import { GraphNode } from 'bob-the-algorithm'; import { GraphNode } from '@bob-the-algorithm/core';
import { useMemo } from 'react'; import { useMemo } from 'react';
import { ConvertedResult } from '../../utils/graph'; import { ConvertedResult } from '../../utils/graph';
import { format } from 'date-fns'; import { format } from 'date-fns';

View File

@@ -1,4 +1,4 @@
import { CalulationResult } from 'bob-the-algorithm'; import { CalulationResult } from '@bob-the-algorithm/core';
function msToHMS(ms: number) { function msToHMS(ms: number) {
// 1- Convert to seconds: // 1- Convert to seconds:

View File

@@ -2,7 +2,10 @@ import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc'; import react from '@vitejs/plugin-react-swc';
import mdx from '@mdx-js/rollup'; import mdx from '@mdx-js/rollup';
const ASSET_URL = process.env.ASSET_URL || '';
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
base: `${ASSET_URL}/dist/`,
plugins: [mdx(), react()], plugins: [mdx(), react()],
}); });

16
pnpm-lock.yaml generated
View File

@@ -30,7 +30,7 @@ importers:
packages/playground: packages/playground:
dependencies: dependencies:
bob-the-algorithm: '@bob-the-algorithm/core':
specifier: workspace:^ specifier: workspace:^
version: link:../algorithm version: link:../algorithm
date-fns: date-fns:
@@ -46,6 +46,9 @@ importers:
'@mdx-js/rollup': '@mdx-js/rollup':
specifier: ^2.3.0 specifier: ^2.3.0
version: 2.3.0(rollup@3.28.1) version: 2.3.0(rollup@3.28.1)
'@types/node':
specifier: ^20.5.9
version: 20.5.9
'@types/react': '@types/react':
specifier: ^18.2.15 specifier: ^18.2.15
version: 18.2.15 version: 18.2.15
@@ -78,7 +81,7 @@ importers:
version: 5.2.2 version: 5.2.2
vite: vite:
specifier: ^4.4.5 specifier: ^4.4.5
version: 4.4.5 version: 4.4.5(@types/node@20.5.9)
packages: packages:
@@ -1028,6 +1031,10 @@ packages:
resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==}
dev: true dev: true
/@types/node@20.5.9:
resolution: {integrity: sha512-PcGNd//40kHAS3sTlzKB9C9XL4K0sTup8nbG5lC14kzEteTNuAFh9u5nA0o5TWnSG2r/JNPRXFVcHJIIeRlmqQ==}
dev: true
/@types/offscreencanvas@2019.7.1: /@types/offscreencanvas@2019.7.1:
resolution: {integrity: sha512-+HSrJgjBW77ALieQdMJvXhRZUIRN1597L+BKvsyeiIlHHERnqjcuOLyodK3auJ3Y3zRezNKtKAhuQWYJfEgFHQ==} resolution: {integrity: sha512-+HSrJgjBW77ALieQdMJvXhRZUIRN1597L+BKvsyeiIlHHERnqjcuOLyodK3auJ3Y3zRezNKtKAhuQWYJfEgFHQ==}
dev: true dev: true
@@ -1375,7 +1382,7 @@ packages:
vite: ^4 vite: ^4
dependencies: dependencies:
'@swc/core': 1.3.82 '@swc/core': 1.3.82
vite: 4.4.5 vite: 4.4.5(@types/node@20.5.9)
transitivePeerDependencies: transitivePeerDependencies:
- '@swc/helpers' - '@swc/helpers'
dev: true dev: true
@@ -4422,7 +4429,7 @@ packages:
vfile-message: 3.1.4 vfile-message: 3.1.4
dev: true dev: true
/vite@4.4.5: /vite@4.4.5(@types/node@20.5.9):
resolution: {integrity: sha512-4m5kEtAWHYr0O1Fu7rZp64CfO1PsRGZlD3TAB32UmQlpd7qg15VF7ROqGN5CyqN7HFuwr7ICNM2+fDWRqFEKaA==} resolution: {integrity: sha512-4m5kEtAWHYr0O1Fu7rZp64CfO1PsRGZlD3TAB32UmQlpd7qg15VF7ROqGN5CyqN7HFuwr7ICNM2+fDWRqFEKaA==}
engines: {node: ^14.18.0 || >=16.0.0} engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true hasBin: true
@@ -4450,6 +4457,7 @@ packages:
terser: terser:
optional: true optional: true
dependencies: dependencies:
'@types/node': 20.5.9
esbuild: 0.18.20 esbuild: 0.18.20
postcss: 8.4.29 postcss: 8.4.29
rollup: 3.28.1 rollup: 3.28.1