Skip to content

Commit 82e5bc0

Browse files
committed
Add automatic workflow for building binaries
1 parent e5873ec commit 82e5bc0

3 files changed

Lines changed: 59 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build & Release Binary
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 18
19+
20+
- name: Install dependencies
21+
run: npm install
22+
23+
- name: Install pkg
24+
run: npm install -g pkg
25+
26+
- name: Build binaries
27+
run: pkg . --out-path dist
28+
29+
- name: Upload to GitHub Releases
30+
uses: softprops/action-gh-release@v1
31+
with:
32+
files: |
33+
dist/protoparser-win.exe
34+
dist/protoparser-linux
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ protparser [options] [filename] [format]
129129
protoparser -vvv -output=myfile MeetingYesterday.pml html
130130
```
131131

132+
### Local development
133+
134+
- Clone the repository
135+
- Make your changes
136+
- Run `npm run build:exe` to build linux and windows executables or simply run `npm uninstall -g protoparser && npm install -g .` to install your local version globally.
137+
132138
### Output
133139

134140
```plaintext

package.json

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "protoml-parser",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "ProtoML is a lightweight, declarative markup language designed for writing and structuring meeting protocols, notes and task lists in a human-readable and machine-parseable format.",
55
"keywords": [
66
"protoml",
@@ -17,16 +17,30 @@
1717
"protoparser": "bin/protoparser.js"
1818
},
1919
"scripts": {
20-
"test": "echo \"Error: no test specified\" && exit 1"
20+
"test": "echo \"Error: no test specified\" && exit 1",
21+
"build:exe": "pkg . --out-path dist"
2122
},
2223
"repository": {
2324
"type": "git",
2425
"url": "git+https://github.com/Ente/protoml-parser.git"
2526
},
2627
"author": "Ente",
28+
"pkg": {
29+
"scripts": "bin/protoparser.js",
30+
"assets": [
31+
"src/renders/themes/*"
32+
],
33+
"targets": [
34+
"node18-win-x64",
35+
"node18-linux-x64"
36+
]
37+
},
2738
"license": "GPL-3.0-or-later",
2839
"bugs": {
2940
"url": "https://github.com/Ente/protoml-parser/issues"
3041
},
31-
"homepage": "https://github.com/Ente/protoml-parser#readme"
42+
"homepage": "https://github.com/Ente/protoml-parser#readme",
43+
"devDependencies": {
44+
"pkg": "^5.8.1"
45+
}
3246
}

0 commit comments

Comments
 (0)