Skip to content

Commit 28139e2

Browse files
committed
ci: Add automatic release
1 parent 430f05e commit 28139e2

File tree

5 files changed

+3666
-2197
lines changed

5 files changed

+3666
-2197
lines changed

.github/workflows/auto.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Auto
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Fetch all tags
18+
run: git fetch --unshallow --tags
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 22.x
24+
25+
- name: Cache node modules
26+
id: cache
27+
uses: actions/cache@v4
28+
with:
29+
path: node_modules
30+
key: deps-${{ hashFiles('yarn.lock') }}
31+
32+
- name: Enable corepack
33+
run: corepack enable
34+
35+
- name: Install dependencies
36+
if: steps.cache.outputs.cache-hit != 'true'
37+
run: yarn install
38+
39+
- name: Release
40+
env:
41+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
42+
run: yarn shipit

.github/workflows/publish.yml

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

lerna.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"version": "0.1.3",
33
"npmClient": "yarn",
4-
"useWorkspaces": true
5-
}
4+
"workspaces": [
5+
"packages/*"
6+
]
7+
}

package.json

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,28 @@
66
"private": true,
77
"scripts": {
88
"build-examples": "tstl",
9-
"release": "lerna version --conventional-commits --create-release github",
10-
"publish-packages": "lerna publish from-git -y --no-verify-access"
9+
"shipit": "auto shipit"
1110
},
1211
"workspaces": [
1312
"packages/*"
1413
],
1514
"devDependencies": {
16-
"lerna": "^4.0.0",
15+
"lerna": "^8.1.9",
1716
"lua-types": "^2.10.1",
18-
"typescript-to-lua": "^0.40.1"
17+
"typescript-to-lua": "^0.40.1",
18+
"@auto-it/conventional-commits": "^11.3.0",
19+
"@auto-it/first-time-contributor": "^11.3.0",
20+
"auto": "^11.3.0"
1921
},
20-
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
21-
}
22+
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
23+
"repository": "Exeteres/opc-types",
24+
"auto": {
25+
"plugins": [
26+
"npm",
27+
"conventional-commits",
28+
"first-time-contributor",
29+
"released"
30+
],
31+
"author": "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
32+
}
33+
}

0 commit comments

Comments
 (0)