Skip to content

Commit e7022bb

Browse files
committed
feat: Make build
1 parent 8228b3a commit e7022bb

7 files changed

Lines changed: 5884 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release CI
2+
on:
3+
push:
4+
branches: [ dev, release ]
5+
workflow_dispatch:
6+
env:
7+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version: [ 18.x ]
14+
steps:
15+
# Step 1: Checkout the code
16+
- uses: actions/checkout@v3
17+
18+
# Step 2: Setup Node.js
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
cache: 'npm'
24+
25+
# Step 3: Install dependencies
26+
- run: npm ci
27+
- run: npm i @iam1337/create-unitypackage
28+
- run: npm i semantic-release-replace-plugin -D
29+
- run: npm i @semantic-release/git -D
30+
- run: npm i @semantic-release/changelog -D
31+
32+
# Step 4: Run Semantic Release and capture output
33+
- name: Run Semantic Release
34+
id: release
35+
run: |
36+
npx semantic-release > output.log || true
37+
if grep -q "Publishing version" output.log; then
38+
echo "new-release=true" >> $GITHUB_ENV
39+
VERSION=$(grep "Publishing version" output.log | sed -n 's/.*Publishing version \(.*\)$/\1/p')
40+
echo "released-version=$VERSION" >> $GITHUB_ENV
41+
else
42+
echo "new-release=false" >> $GITHUB_ENV
43+
fi
44+
45+
# Step 5: Print the new release version if available
46+
- name: Print New Release Info
47+
if: env.new-release == 'true'
48+
run: |
49+
echo "New release created: version ${{ env.released-version }}"

.releaserc

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"branches": [
3+
{
4+
"name": "release",
5+
"channel": "latest",
6+
"type": "release"
7+
},
8+
{
9+
"name": "dev",
10+
"prerelease": "beta"
11+
}
12+
],
13+
"plugins": [
14+
"@semantic-release/commit-analyzer",
15+
"@semantic-release/release-notes-generator",
16+
["@semantic-release/changelog", {
17+
"changelogFile": "Assets/PurrNet-Conversion/CHANGELOG.md"
18+
}],
19+
["semantic-release-replace-plugin", {
20+
"replacements": [
21+
{
22+
"files": ["Assets/PurrNet-Conversion/package.json"],
23+
"from": "\"version\": \".*?\"",
24+
"to": "\"version\": \"${nextRelease.version}\"",
25+
"results": [
26+
{
27+
"file": "Assets/PurrNet-Conversion/package.json",
28+
"hasChanged": true,
29+
"numMatches": 1,
30+
"numReplacements": 1
31+
}
32+
],
33+
"countMatches": true
34+
}
35+
]
36+
}],
37+
["@iam1337/create-unitypackage", {
38+
"packageRoot": "Assets/PurrNet-Conversion",
39+
"projectRoot": "./",
40+
"output": "PurrNet_ConversionTool_${nextRelease.version}.unitypackage"
41+
}],
42+
["@semantic-release/git", {
43+
"assets": ["Assets/PurrNet-Conversion/package.json", "Assets/PurrNet-Conversion/CHANGELOG.md"],
44+
"message": "ci(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
45+
}],
46+
["@semantic-release/github", {
47+
"assets": [
48+
{"path": "PurrNet_ConversionTool_${nextRelease.version}.unitypackage", "label": "PurrNet_ConversionTool_${nextRelease.version}.unitypackage"}
49+
]
50+
}]
51+
]
52+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Assets/PurrNet-Conversion/LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2025 Pebbles Games Consultancy Corporation, Riten SARL
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 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.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "dev.purrnet.conversiontool",
3+
"version": "1.0.0",
4+
"author": {
5+
"name": "PurrNet Team",
6+
"url": "https://purrnet.dev/"
7+
},
8+
"description": "A recipe-based conversion tool for migrating networking projects to PurrNet. Supports FishNet conversion out of the box.",
9+
"displayName": "PurrNet Conversion Tool",
10+
"documentationUrl": "https://purrnet.gitbook.io/",
11+
"hideInEditor": false,
12+
"keywords": [
13+
"purrnet",
14+
"networking",
15+
"multiplayer",
16+
"conversion",
17+
"migration",
18+
"fishnet"
19+
]
20+
}

0 commit comments

Comments
 (0)