Skip to content
Draft

2.0 #11

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .chglog/CHANGELOG.tpl.md
100644 → 100755
Empty file.
Empty file modified .chglog/config.yml
100644 → 100755
Empty file.
Empty file modified .editorconfig
100644 → 100755
Empty file.
Empty file modified .gitattributes
100644 → 100755
Empty file.
Empty file modified .github/workflows/git-chglog.yml
100644 → 100755
Empty file.
23 changes: 0 additions & 23 deletions .github/workflows/publish-browser-package.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/publish-to-gh.yml

This file was deleted.

82 changes: 82 additions & 0 deletions .github/workflows/publish_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Publish Package
on:
workflow_dispatch:
release:
types: [published]
jobs:
node-build:
name: Publishing package for NodeJs and Bun
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn config set enableImmutableInstalls false
- run: yarn install
- run: yarn build
- run: npm publish --tag latest --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
browser-build:
name: Publishing package for Browser
needs: node-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn config set enableImmutableInstalls false
- run: yarn install
- run: yarn add aes-js browserify-zlib buffer crypto-browserify events os-browserify path-browserify util stream-browserify process @tgsnake/bytesio@browser @tgsnake/log@browser
- run: yarn add --dev @tgsnake/skema@browser
- run: yarn add --peer @tgsnake/skema@browser
- run: node ./generator/build_browser/index.js
- run: yarn install
- run: yarn build
- run: npm publish --tag browser --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
jsr-build:
name: Publishing package for JSR
needs: node-build
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '22.x'
- uses: denoland/setup-deno@v2
with:
deno-version: '2.x'
- run: deno install
- run: git add deno.lock
- run: |
git commit -m "chore: Update deno.lock" || echo "No changes to commit"
- run: npx jsr publish
github-build:
name: Publishing package to GitHub Packages
needs: node-build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v6
with:
node-version: '20.x'
registry-url: 'https://npm.pkg.github.com'
# Defaults to the user or organization that owns the workflow file
scope: '@tgsnake'
- run: yarn install
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/sync_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Sync version
on:
workflow_dispatch:
push:
branches:
- master
jobs:
sync-version:
name: Syncing version to package.json
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '22.x'
- uses: denoland/setup-deno@v2
with:
deno-version: '2.x'
- run: yarn config set enableImmutableInstalls false
- run: deno install
- run: git add deno.lock
- run: |
git commit -m "chore: Update deno.lock" || echo "No changes to commit"
- run: yarn install
- run: yarn build:jsr
- run: git config user.email github-actions[bot]@users.noreply.github.com
- run: git config user.name github-actions[bot]
- run: yarn prettier
- run: git add jsr.json
- run: git commit -m "Sync JSR version to package.json" || echo "No changes to commit"
- run: git push origin master || echo "No changes to push"
39 changes: 28 additions & 11 deletions .github/workflows/test-build.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Testing Build Package

name: Testing Package
on:
workflow_dispatch:
pull_request:
branches:
- master
push:
branches:
- master
Expand All @@ -11,23 +13,38 @@ jobs:
name: Building package for NodeJs and Bun
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '20.x'
node-version: '22.x'
- run: yarn config set enableImmutableInstalls false
- run: yarn install
- run: yarn build
browser-build:
name: Building package for Browser
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '20.x'
node-version: '22.x'
- run: yarn config set enableImmutableInstalls false
- run: yarn install
- run: yarn add aes-js browserify-zlib buffer crypto-browserify events os-browserify path-browserify util stream-browserify process
- run: node ./generator/change_package_json/index.js
- run: node ./generator/bundler/index.mjs
- run: yarn add aes-js browserify-zlib buffer crypto-browserify events os-browserify path-browserify util stream-browserify process @tgsnake/bytesio@browser @tgsnake/log@browser
- run: yarn add --dev @tgsnake/skema@browser
- run: yarn add --peer @tgsnake/skema@browser
- run: node ./generator/build_browser/index.js
- run: yarn build
jsr-build:
name: Building package for JSR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '22.x'
- uses: denoland/setup-deno@v2
with:
deno-version: '2.x'
- run: deno install
- run: npx jsr publish --dry-run --allow-dirty
4 changes: 1 addition & 3 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,4 @@ test/**
# src/raw/Raw.ts
# src/raw/All.ts
# src/errors/exceptions
browser/**

deno.lock
browser/**
Empty file modified .npmrc
100644 → 100755
Empty file.
Empty file modified .prettierignore
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion .vscode/settings.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"deno.enable": true,
"deno.enable": false,
"files.exclude": {
"**.browser.ts": true,
"**.node.ts": true
Expand Down
Loading