From 250984b2baf462266d7cafc5a6eb7b82b0fd2dbb Mon Sep 17 00:00:00 2001 From: Andrew McClenaghan Date: Wed, 5 Apr 2023 22:44:04 +1000 Subject: [PATCH] fix(ci): Add support to bundle up files for plugin --- .github/workflows/release-please.yml | 28 ++++++++++++++++++++++++++-- dist/manifest.json | 2 +- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 6fb081e0..9cc1f55e 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -13,7 +13,31 @@ jobs: release-please: runs-on: ubuntu-latest steps: - - uses: google-github-actions/release-please-action@v3 + - name: Checkout repository + uses: actions/checkout@v3 + + - id: release-please + uses: google-github-actions/release-please-action@v3 with: release-type: node - package-name: release-please-action \ No newline at end of file + package-name: release-please-action + extra-files: | + dist/manifest.json + + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: "16.x" # You might need to adjust this value to your own version + + - name: Upload release assets + if: ${{ steps.release-please.outputs.release_created }} + run: | + npm ci + npm run build --if-present + zip -r ${{ github.event.repository.name }}-${{ env.tag }}.zip dist + + TAG=${{ steps.release-please.outputs.tag_name }} + FILES=$(echo dist/*) + gh release upload $TAG $FILES + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/dist/manifest.json b/dist/manifest.json index 20d7635e..54bdcefb 100644 --- a/dist/manifest.json +++ b/dist/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-confluence", "name": "Confluence Integration", - "version": "0.0.0", + "version": "0.0.0", // x-release-please-version "minAppVersion": "1.0.0", "description": "This plugin allows you to publish your notes to Confluence", "author": "obsidian-confluence",