Skip to content

Commit c06b8e5

Browse files
committed
Add Github Workflow for release automation
1 parent dca5e8f commit c06b8e5

File tree

3 files changed

+38
-24
lines changed

3 files changed

+38
-24
lines changed

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Create schema.json
20+
run: node scripts/create-schema.js
21+
22+
- name: Upload schema.json
23+
uses: actions/upload-artifact@v4
24+
with:
25+
name: schema.json
26+
path: schema.json
27+
28+
- name: Extract package version
29+
run: echo "PACKAGE_VERSION=$(npm pkg get version | sed 's/"//g')" >> "$GITHUB_ENV"
30+
31+
- name: Create release
32+
uses: softprops/action-gh-release@v2
33+
with:
34+
name: "v${{ env.PACKAGE_VERSION }}"
35+
tag_name: "v${{ env.PACKAGE_VERSION }}"
36+
files: schema.json
37+
make_latest: true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "shadncn-tree-view",
3-
"version": "0.0.1",
3+
"version": "1.0.1",
44
"description": "",
55
"main": "index.js",
66
"scripts": {

schema.json

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

0 commit comments

Comments
 (0)