Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
101 changes: 55 additions & 46 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,85 @@
name: Release

on:
workflow_dispatch:
inputs:
branch:
description: 'The branch to release from (e.g., main, beta, next). Semantic-release must be configured for this branch.'
required: true
default: 'main'
push:
branches:
- main
- beta

jobs:
build:
strategy:
fail-fast: false
runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.13'

- name: Install GCC
id: install-gcc
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: build-essential@latest
version: 1.0

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install node-gyp
run: bun add -g node-gyp

- name: Install dependencies
run: bun install --ignore-scripts --frozen-lockfile
run: bun install --frozen-lockfile

- name: Setup zig
uses: mlugg/setup-zig@v1

- name: Build
run: bun run build
run: bun run build.ts

# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: memoryjs
# path: lib/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: memoryprocess
path: lib/

# release:
# needs: [build]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# ref: ${{ github.event.inputs.checkout-branch }}
# submodules: true
release:
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }}
persist-credentials: false

# - name: Download artifacts
# uses: actions/[email protected]
# with:
# name: memoryjs
# path: lib/
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: memoryprocess
path: lib/

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

# - name: Setup Node
# uses: actions/setup-node@v4
# with:
# node-version: '20'
# registry-url: 'https://registry.npmjs.org'
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Configure npm
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
npm whoami
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# - name: Publish release
# run: npm publish --access public
- name: Run semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
20 changes: 20 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"branches": [
"main",
{ "name": "beta", "prerelease": true },
{ "name": "alpha", "prerelease": true }
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-note-generator",
"@semantic-release/npm",
"@semantic-release/github",
[
"@semantic-release/git",
{
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
7 changes: 3 additions & 4 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)
MIT License

Copyright (c) 2019 Robert Valentyne
Copyright (c) 2025 JoShMiQueL

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,5 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

SOFTWARE.
Loading
Loading