Skip to content

add stuf

add stuf #348

Workflow file for this run

name: Release Obsidian Plugin
on:
push:
tags:
- "test-*"
- "*"
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"
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install dependencies
run: pnpm install
- name: Build plugin
run: pnpm --filter "./packages/plugin" build
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Creating release for tag ${GITHUB_REF#refs/tags/}"
if [[ ${GITHUB_REF#refs/tags/} == test-* ]]; then
echo "TEST MODE: Would create release with files:"
echo "- packages/plugin/dist/main.js"
echo "- packages/plugin/manifest.json"
echo "- packages/plugin/dist/styles.css"
# Verify files exist
ls -la packages/plugin/dist/main.js packages/plugin/manifest.json packages/plugin/dist/styles.css || true
else
gh release create "${GITHUB_REF#refs/tags/}" \
--title="${GITHUB_REF#refs/tags/}" \
--draft=false \
--prerelease=false \
packages/plugin/dist/main.js packages/plugin/manifest.json packages/plugin/dist/styles.css
fi