From 6d2045ed15209f79e2ac128ecfc6ff7df5ac32bb Mon Sep 17 00:00:00 2001 From: kaj <40004347+KAJdev@users.noreply.github.com> Date: Fri, 19 May 2023 19:42:54 -0800 Subject: [PATCH] readme & github action build pipeline --- .../default/.github/workflows/release.yml | 43 +++++++++++++++++++ .../templates/default/README.md | 11 ++++- .../templates/default/packagejson | 2 +- .../templates/default/tsconfig.json | 1 - 4 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 packages/create-stablestudio-plugin/templates/default/.github/workflows/release.yml diff --git a/packages/create-stablestudio-plugin/templates/default/.github/workflows/release.yml b/packages/create-stablestudio-plugin/templates/default/.github/workflows/release.yml new file mode 100644 index 0000000..c9ffc0e --- /dev/null +++ b/packages/create-stablestudio-plugin/templates/default/.github/workflows/release.yml @@ -0,0 +1,43 @@ +name: release + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: yarn + + - name: Install Dependencies + run: yarn install + + - name: Build + run: yarn build + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + + - name: upload build artifact + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./lib/index.js + asset_name: plugin.js + asset_content_type: application/javascript diff --git a/packages/create-stablestudio-plugin/templates/default/README.md b/packages/create-stablestudio-plugin/templates/default/README.md index f3e919b..9e51c4c 100644 --- a/packages/create-stablestudio-plugin/templates/default/README.md +++ b/packages/create-stablestudio-plugin/templates/default/README.md @@ -4,6 +4,12 @@ This is a [StableStudio plugin](https://github.com/Stability-AI/StableStudio) bo - explain how to get a plugin built +``` +yarn build + +npm run build +``` + - explain basic outline of functions ## Learn more @@ -12,4 +18,7 @@ This is a [StableStudio plugin](https://github.com/Stability-AI/StableStudio) bo ## Deploying -- explain pushing to github to make CI build and create artifacts stablestudio can import \ No newline at end of file +- explain pushing to github to make CI build and create artifacts stablestudio can import +``` +git push +``` \ No newline at end of file diff --git a/packages/create-stablestudio-plugin/templates/default/packagejson b/packages/create-stablestudio-plugin/templates/default/packagejson index 12f0a8b..0ee76b8 100644 --- a/packages/create-stablestudio-plugin/templates/default/packagejson +++ b/packages/create-stablestudio-plugin/templates/default/packagejson @@ -8,7 +8,7 @@ ], "scripts": { "clean": "rimraf lib && rimraf node_modules", - "build:types": "ttsc --project tsconfig.json", + "build:types": "ttsc", "build:javascript": "tsx scripts/Build.ts", "build": "yarn build:types && yarn build:javascript", "dev": "nodemon --watch src --ext ts,tsx,json --exec \"yarn build\"" diff --git a/packages/create-stablestudio-plugin/templates/default/tsconfig.json b/packages/create-stablestudio-plugin/templates/default/tsconfig.json index cf989c0..2ac5f52 100644 --- a/packages/create-stablestudio-plugin/templates/default/tsconfig.json +++ b/packages/create-stablestudio-plugin/templates/default/tsconfig.json @@ -1,5 +1,4 @@ { - "extends": "../../tsconfig.json", "include": [ "src/**/*" ],