generated from obsidianmd/obsidian-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 35
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
3 changed files
with
102 additions
and
47 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
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,78 @@ | ||
name: Release beta version | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "The beta version of the plugin e.g. 1.0.0-beta.1" | ||
required: true | ||
|
||
env: | ||
PLUGIN_NAME: obsidian-reminder | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: master | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: develop | ||
- name: Check if the tag commit is equal to the latest commit | ||
run: | | ||
if [ "$(git rev-parse ${{ github.ref }})" != "$(git rev-parse develop)" ]; then | ||
echo "Tag commit is not equal to the latest commit" | ||
exit 1 | ||
fi | ||
- name: Update the versions | ||
run: | | ||
version=${{ github.event.inputs.version }} | ||
echo "RELEASE_VERSION=$version" >> $GITHUB_ENV | ||
# update manifest version | ||
sed -i "s/\"version\": \".*\"/\"version\": \"$version\"/" manifest-beta.json | ||
# commit and push the changes | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git add manifest-beta.json | ||
git commit -m "Update the version to $version" | ||
git push origin develop | ||
git tag $version | ||
git push --tags | ||
# cherry pick the commit to master | ||
git checkout master | ||
git cherry-pick $version | ||
git push origin master | ||
# go back to develop | ||
git checkout develop | ||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: "16.x" # You might need to adjust this value to your own version | ||
- name: Build | ||
id: build | ||
run: | | ||
npm ci | ||
npm run build | ||
mkdir ${{ env.PLUGIN_NAME }} | ||
cp main.js manifest.json styles.css ${{ env.PLUGIN_NAME }} | ||
zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }} | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ github.ref }} | ||
name: ${{ env.RELEASE_VERSION }} | ||
draft: true | ||
prerelease: false | ||
files: | | ||
${{ env.PLUGIN_NAME }}.zip | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"id": "obsidian-reminder-plugin", | ||
"name": "Reminder", | ||
"version": "1.1.15", | ||
"minAppVersion": "1.0.3", | ||
"description": "Reminder plugin for Obsidian. This plugin adds feature to manage TODOs with reminder.", | ||
"author": "uphy", | ||
"authorUrl": "https://obsidian.md/about", | ||
"isDesktopOnly": false | ||
} |