Skip to content

Commit 6918801

Browse files
authored
Develop (#28)
* ci: new release workflow (#25) * Migrate-to-bun-ffi (#27) * feat: update project branding and identity * refactor: migrate from node-gyp to bun:ffi * ci: update release workflow * docs: Update README and add TODOs for types * refactor: Update package config and cleanup native process code * ci: Allow manual dispatch of Release workflow * feat: configure automated releases and commit linting * ci: trigger release workflow on push to beta branch
1 parent 753efd8 commit 6918801

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1803
-4949
lines changed

.commitlintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

.github/workflows/bump-version.yml

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

.github/workflows/release.yml

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,85 @@
11
name: Release
22

3-
permissions:
4-
contents: write
5-
packages: write
6-
73
on:
8-
release:
9-
types:
10-
- published
114
workflow_dispatch:
125
inputs:
13-
checkout-branch:
14-
description: 'The branch or tag to checkout (same as workflow if not specified)'
15-
required: false
6+
branch:
7+
description: 'The branch to release from (e.g., main, beta, next). Semantic-release must be configured for this branch.'
8+
required: true
9+
default: 'main'
10+
push:
11+
branches:
12+
- main
13+
- beta
1614

17-
jobs:
15+
jobs:
1816
build:
1917
strategy:
2018
fail-fast: false
21-
runs-on: windows-2019
19+
runs-on: windows-latest
2220
steps:
2321
- name: Checkout
2422
uses: actions/checkout@v4
2523
with:
26-
ref: ${{ github.event.inputs.checkout-branch }}
27-
submodules: true
28-
29-
- name: Setup Python
30-
uses: actions/setup-python@v4
31-
with:
32-
python-version: '3.11'
24+
persist-credentials: false
3325

3426
- name: Setup Bun
3527
uses: oven-sh/setup-bun@v2
3628
with:
3729
bun-version: latest
3830

39-
- name: Install node-gyp
40-
run: bun add -g node-gyp
41-
4231
- name: Install dependencies
43-
run: bun install --ignore-scripts
32+
run: bun install --frozen-lockfile
33+
34+
- name: Setup zig
35+
uses: mlugg/setup-zig@v1
4436

4537
- name: Build
46-
run: bun run build
38+
run: bun run build.ts
4739

4840
- name: Upload artifact
4941
uses: actions/upload-artifact@v4
5042
with:
51-
name: memoryjs
43+
name: memoryprocess
5244
path: lib/
5345

5446
release:
5547
needs: [build]
5648
runs-on: ubuntu-latest
49+
permissions:
50+
contents: write
51+
issues: write
52+
pull-requests: write
53+
id-token: write
5754
steps:
5855
- name: Checkout
5956
uses: actions/checkout@v4
6057
with:
61-
ref: ${{ github.event.inputs.checkout-branch }}
62-
submodules: true
58+
fetch-depth: 0
59+
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }}
60+
persist-credentials: false
6361

6462
- name: Download artifacts
65-
uses: actions/download-artifact@v4.1.7
63+
uses: actions/download-artifact@v4
6664
with:
67-
name: memoryjs
65+
name: memoryprocess
6866
path: lib/
69-
70-
- name: Setup Node
67+
68+
- name: Setup Node.js
7169
uses: actions/setup-node@v4
7270
with:
7371
node-version: '20'
74-
registry-url: 'https://registry.npmjs.org'
72+
cache: 'npm'
73+
74+
- name: Configure npm
75+
run: |
76+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
77+
npm whoami
7578
env:
76-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
79+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
7780

78-
- name: Publish release
79-
run: npm publish --access public
81+
- name: Run semantic-release
82+
run: npx semantic-release
83+
env:
84+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.releaserc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"branches": [
3+
"main",
4+
{ "name": "beta", "prerelease": true },
5+
{ "name": "alpha", "prerelease": true }
6+
],
7+
"plugins": [
8+
"@semantic-release/commit-analyzer",
9+
"@semantic-release/release-note-generator",
10+
"@semantic-release/npm",
11+
"@semantic-release/github",
12+
[
13+
"@semantic-release/git",
14+
{
15+
"assets": ["package.json", "CHANGELOG.md"],
16+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
17+
}
18+
]
19+
]
20+
}

LICENSE.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
The MIT License (MIT)
1+
MIT License
22

3-
Copyright (c) 2019 Robert Valentyne
3+
Copyright (c) 2025 JoShMiQueL
44

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

0 commit comments

Comments
 (0)