mirror of
https://github.com/markusmo3/obsidian-private-mode.git
synced 2026-07-22 12:20:24 +00:00
34 lines
1 KiB
YAML
34 lines
1 KiB
YAML
# Source: https://docs.obsidian.md/Plugins/Releasing/Release+your+plugin+with+GitHub+Actions
|
|
name: Release Obsidian plugin
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
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: Build plugin
|
|
run: |
|
|
npm install
|
|
npm run build
|
|
|
|
- name: Create release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PLUGIN_NAME: ${{ github.event.repository.name }}
|
|
run: |
|
|
sh ./.github/make_release.sh ${PLUGIN_NAME}
|
|
|
|
tag="${GITHUB_REF#refs/tags/}"
|
|
gh release create "$tag" --generate-notes ${PLUGIN_NAME}.zip
|
|
gh release upload "$tag" ${PLUGIN_NAME}/main.js ${PLUGIN_NAME}/manifest.json ${PLUGIN_NAME}/styles.css
|