Skip to content

ci: adding pnpm/action-setup to the github action #30

ci: adding pnpm/action-setup to the github action

ci: adding pnpm/action-setup to the github action #30

Workflow file for this run

name: Release Obsidian plugin
on:
push:
tags:
- "*.*.*"
env:
PLUGIN_NAME: obsidian-todotxt-plugin
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
- uses: pnpm/action-setup@v4
# make sure we have packageManager entry in package.json
- name: Build
id: build
run: |
pnpm install
pnpm run build
mkdir ${{ env.PLUGIN_NAME }}
cp dist/main.js dist/manifest.json dist/styles.css ${{ env.PLUGIN_NAME }}
cp dist/main.js dist/styles.css ./
zip -r ${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.zip ${{ env.PLUGIN_NAME }}
ls
- name: Create release notes
uses: johnyherangi/create-release-notes@main
id: create-release-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create-release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.create-release-notes.outputs.release-notes }}
files: |
main.js
styles.css
manifest.json
${{ env.PLUGIN_NAME }}-${{ github.ref_name }}.zip