Skip to content

Commit

Permalink
Add Github Workflow for release automation
Browse files Browse the repository at this point in the history
  • Loading branch information
MrLightful committed Sep 13, 2024
1 parent dca5e8f commit fd2f9fa
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 24 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
on:
push:
branches:
- main

permissions:
contents: write

jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v2

- name: Create schema.json
run: node scripts/create-schema.js

- name: Upload schema.json
uses: actions/upload-artifact@v4
with:
name: schema.json
path: schema.json

release:
name: Release
runs-on: ubuntu-latest
needs: build
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Download schema.json
uses: actions/download-artifact@v4
with:
name: schema.json

- name: Extract package version
run: echo "PACKAGE_VERSION=$(npm pkg get version)" >> "$GITHUB_ENV"

- name: Create release
uses: softprops/action-gh-release@v2
with:
name: "v$PACKAGE_VERSION"
tag_name: "v$PACKAGE_VERSION"
files: ${{ steps.create_release.outputs.upload_url }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shadncn-tree-view",
"version": "0.0.1",
"version": "1.0.1",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
23 changes: 0 additions & 23 deletions schema.json

This file was deleted.

0 comments on commit fd2f9fa

Please sign in to comment.