-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,308 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: 'Dependency Review' | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- release | ||
- dev | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
dependency-review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout Repository' | ||
uses: actions/checkout@v4 | ||
- name: 'Dependency Review' | ||
uses: actions/dependency-review-action@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# ====================================================================================================================================================== | ||
# Custom GitHub Action to draft a pre-release | ||
# | ||
# A GitHub draft pre-release is automatically created when the plugin's | ||
# `manifest-beta.json` is updated on the `release` branch. | ||
# | ||
# Based on : | ||
# - [Obsidian developers docs](https://docs.obsidian.md/Plugins/Releasing/Release+your+plugin+with+GitHub+Actions) | ||
# - [BRAT docs for developers](https://tfthacker.com/brat-developers) | ||
# - [Excellent tutorial for multiline strings in GitHub Actions by Thomas Stringer](https://trstringer.com/github-actions-multiline-strings/) | ||
# ====================================================================================================================================================== | ||
name: "Create a draft Beta pre-release" | ||
|
||
on: | ||
# The workflow can be run manually | ||
workflow_dispatch: | ||
# The workflow is also triggered automatically when a push | ||
# happens where the plugin's `manifest-beta.json` is modified | ||
push: | ||
branches: | ||
- release | ||
paths: | ||
- 'manifest-beta.json' | ||
|
||
jobs: | ||
create-draft-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
|
||
- name: Build plugin | ||
run: | | ||
npm install | ||
npm run build | ||
# To easily read JSON files and extract the version from the manifest | ||
- name: Install jq | ||
uses: dcarbone/[email protected] | ||
|
||
- name: Extract tag from manifest | ||
# Extract the tag to use from the beta manifest file | ||
run: | | ||
tag=$(jq -r '.version' manifest-beta.json) | ||
echo "Extracted tag: $tag" | ||
echo "TAG=$tag" >> $GITHUB_ENV | ||
# Prepare a release notes template | ||
- name: Prepare generic release notes | ||
run: | | ||
notes=$(cat <<EOF | ||
Open \`.ipynb\` files, edit them and run them directly inside of Obsidian without the need to open a terminal or a browser. | ||
Obsidian Jupyter is a plugin for [Obsidian](https://obsidian.md) that offers [Jupyter](https://jupyter.org/) Notebook and Lab integration directly into Obsidian. | ||
## How to install | ||
Interested? Please follow the instructions of the [documentation](https://jupyter.mael.im) and let me hear your feedback, it enables me to keep improve the plugin. Thank you in advance ! | ||
## Change Log | ||
### Features | ||
### Bug fixes | ||
### Documentation | ||
### Logistic | ||
### Development | ||
EOF | ||
) | ||
# Thank you Thomas Stringer for this : https://trstringer.com/github-actions-multiline-strings/ | ||
echo "NOTES<<EOF" >> $GITHUB_ENV | ||
echo "$notes" >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
- name: Create draft release | ||
env: | ||
# Extract the variables set previously from the environment | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TAG: ${{ env.TAG }} | ||
NOTES: ${{ env.NOTES }} | ||
# Create a draft release with GitHub CLI | ||
run: | | ||
gh release create "$TAG" \ | ||
--title="Obsidian Jupyter v$TAG" \ | ||
--draft \ | ||
--prerelease \ | ||
--notes "$NOTES" \ | ||
--generate-notes \ | ||
main.js manifest-beta.json styles.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# ====================================================================================================================================================== | ||
# Custom GitHub Action to draft a release | ||
# | ||
# A GitHub draft release is automatically created when the plugin's `manifest.json` | ||
# is updated on the `release` branch. | ||
# | ||
# Based on : | ||
# - [Obsidian developers docs](https://docs.obsidian.md/Plugins/Releasing/Release+your+plugin+with+GitHub+Actions) | ||
# - [Excellent tutorial for multiline strings in GitHub Actions by Thomas Stringer](https://trstringer.com/github-actions-multiline-strings/) | ||
# ====================================================================================================================================================== | ||
name: "Create a draft pre-release" | ||
|
||
on: | ||
# The workflow can be run manually | ||
workflow_dispatch: | ||
# The workflow is also triggered automatically when a push | ||
# happens where the plugin's `manifest.json` is modified | ||
push: | ||
branches: | ||
- release | ||
paths: | ||
- 'test-vault/.obsidian/plugins/jupyter/manifest.json' | ||
|
||
jobs: | ||
create-draft-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
|
||
- name: Build plugin | ||
run: | | ||
npm install | ||
npm run build | ||
# To easily read JSON files and extract the version from the manifest | ||
- name: Install jq | ||
uses: dcarbone/[email protected] | ||
|
||
- name: Extract tag from manifest | ||
# Extract the tag to use from the manifest file | ||
run: | | ||
tag=$(jq -r '.version' manifest.json) | ||
echo "Extracted tag: $tag" | ||
echo "TAG=$tag" >> $GITHUB_ENV | ||
# Prepare a release notes template | ||
- name: Prepare generic release notes | ||
run: | | ||
notes=$(cat <<EOF | ||
Open \`.ipynb\` files, edit them and run them directly inside of Obsidian without the need to open a terminal or a browser. | ||
Obsidian Jupyter is a plugin for [Obsidian](https://obsidian.md) that offers [Jupyter](https://jupyter.org/) Notebook and Lab integration directly into Obsidian. | ||
## How to install | ||
Interested? Please follow the instructions of the [documentation](https://jupyter.mael.im) and let me hear your feedback, it enables me to keep improve the plugin. Thank you in advance ! | ||
## Change Log | ||
### Features | ||
### Bug fixes | ||
### Documentation | ||
### Logistic | ||
### Development | ||
EOF | ||
) | ||
# Thank you Thomas Stringer for this : https://trstringer.com/github-actions-multiline-strings/ | ||
echo "NOTES<<EOF" >> $GITHUB_ENV | ||
echo "$notes" >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
- name: Create draft release | ||
env: | ||
# Extract the variables set previously from the environment | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TAG: ${{ env.TAG }} | ||
NOTES: ${{ env.NOTES }} | ||
# Create a draft release with GitHub CLI | ||
run: | | ||
gh release create "$TAG" \ | ||
--title="Obsidian Jupyter v$TAG" \ | ||
--draft \ | ||
--notes "$NOTES" \ | ||
--generate-notes \ | ||
main.js manifest.json styles.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Security Policy | ||
|
||
## Reporting a Vulnerability | ||
|
||
People being able to use this Obsidian plugin with peace of mind and in a safe manner is a top priority. | ||
|
||
If you discover a security vulnerability within this repository, please follow these steps: | ||
|
||
1. **Do no report security vulnerabilities through public mediums** such as GitHub issues and discussions. | ||
|
||
2. **Use [GitHub Security Advisories](https://github.com/MaelImhof/obsidian-jupyter/security)** instead. Click `Report a vulnerability` and write your report. I (the maintainer) will answer you as soon as I can before looking into your discovery. | ||
|
||
3. **Provide detailed information**, such as how it can be reproduced, the potential impact, and any other information that might be helpful to understand the vulnerability. | ||
|
||
Thank you very much for your support in keeping this project secure ! Your efforts to responsibly disclose your findings are greatly appreciated and will of course be acknowledged. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.