diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ff11f45 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,82 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + outputs: + main-js-path: ${{ steps.build.outputs.main-js-path }} + styles-css-path: ${{ steps.build.outputs.styles-css-path }} + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - run: npm ci + - run: npm run build + + - id: build + run: | + echo "main-js-path=main.js" >> $GITHUB_OUTPUT + echo "styles-css-path=styles.css" >> $GITHUB_OUTPUT + + attest: + needs: build + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - run: npm ci + - run: npm run build + + - name: Attest build provenance for main.js + uses: actions/attest-build-provenance@v1 + with: + subject-path: main.js + + - name: Attest build provenance for styles.css + uses: actions/attest-build-provenance@v1 + with: + subject-path: styles.css + + release: + needs: [build, attest] + runs-on: ubuntu-latest + permissions: + contents: write + id-token: write + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - run: npm ci + - run: npm run build + + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + files: | + main.js + styles.css + manifest.json diff --git a/manifest.json b/manifest.json index 471a942..74e5866 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "name": "DocDrop", "version": "1.0.0", "minAppVersion": "1.0.0", - "description": "Obsidian plugin: Convert PDF files to Markdown using Microsofts markitdown CLI.", + "description": "Convert PDF files to Markdown using Microsoft's markitdown CLI.", "author": "Rhys Gottwald", "authorUrl": "", "isDesktopOnly": true diff --git a/package-lock.json b/package-lock.json index eb72daa..fddc681 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "obsidian": "latest" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.19", "@typescript-eslint/parser": "^8.59.1", "esbuild": "^0.25.5", "eslint": "^9.39.4", @@ -889,9 +889,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.19.17", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.17.tgz", - "integrity": "sha512-wGdMcf+vPYM6jikpS/qhg6WiqSV/OhG+jeeHT/KlVqxYfD40iYJf9/AE1uQxVWFvU7MipKRkRv8NSHiCGgPr8Q==", + "version": "22.19.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.19.tgz", + "integrity": "sha512-dyh/xO2Fh5bYrfWaaqGrRQQGkNdmYw6AmaAUvYeUMNTWQtvb796ikLdmTchRmOlOiIJ1TDXfWgVx1QkUlQ6Hew==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index d7456c3..f1bf5d0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "docdrop", "version": "1.0.0", - "description": "Obsidian plugin: Convert PDF files to Markdown using Microsofts markitdown CLI.", + "description": "Convert PDF files to Markdown using Microsoft's markitdown CLI.", "main": "main.js", "type": "module", "scripts": { @@ -14,7 +14,7 @@ "obsidian": "latest" }, "devDependencies": { - "@types/node": "^22.0.0", + "@types/node": "^22.19.19", "@typescript-eslint/parser": "^8.59.1", "esbuild": "^0.25.5", "eslint": "^9.39.4",