File tree Expand file tree Collapse file tree 5 files changed +23
-9
lines changed
Expand file tree Collapse file tree 5 files changed +23
-9
lines changed Original file line number Diff line number Diff line change 1111jobs :
1212 build :
1313 runs-on : ubuntu-latest
14+ permissions : write-all
1415
1516 steps :
1617 - uses : actions/checkout@v2
@@ -25,10 +26,11 @@ jobs:
2526 npm install
2627 npm run build
2728 mkdir ${{ env.PLUGIN_NAME }}
28- cp main.js manifest.json ${{ env.PLUGIN_NAME }}
29+ cp build/main.js ${{ env.PLUGIN_NAME }}
30+ cp manifest.json ${{ env.PLUGIN_NAME }}
2931 zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }}
3032 ls
31- echo "::set-output name=tag_name::$(git tag --sort version:refname | tail -n 1)"
33+ echo "name=tag_name::$(git tag --sort version:refname | tail -n 1)" >> $GITHUB_OUTPUT
3234
3335 - name : Create Release
3436 id : create_release
3941 with :
4042 tag_name : ${{ github.ref }}
4143 release_name : ${{ github.ref }}
42- draft : false
44+ draft : true
4345 prerelease : false
4446
4547 - name : Upload zip file
6062 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6163 with :
6264 upload_url : ${{ steps.create_release.outputs.upload_url }}
63- asset_path : . /main.js
65+ asset_path : build /main.js
6466 asset_name : main.js
6567 asset_content_type : text/javascript
6668
7476 asset_path : ./manifest.json
7577 asset_name : manifest.json
7678 asset_content_type : application/json
79+
80+ - uses : eregon/publish-release@v1
81+ env :
82+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
83+ with :
84+ release_id : ${{ steps.create_release.outputs.id }}
Original file line number Diff line number Diff line change 11{
22 "id" : " pocketbook-cloud-highlight-importer" ,
33 "name" : " Pocketbook Cloud Highlight Importer" ,
4- "version" : " 0.1.5 " ,
4+ "version" : " 0.1.6 " ,
55 "minAppVersion" : " 1.1.16" ,
66 "description" : " Imports notes and highlights from your Pocketbook Cloud account." ,
77 "author" : " Lena Brüder" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " pocketbook-cloud-highlight-importer" ,
3- "version" : " 0.1.5 " ,
3+ "version" : " 0.1.6 " ,
44 "description" : " Pocketbook Cloud Highlight Importer" ,
55 "main" : " main.js" ,
66 "scripts" : {
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ set -e
3+
24# cd to git root https://stackoverflow.com/a/38843585
35r=$( git rev-parse --git-dir) && r=$( cd " $r " && pwd) / && cd " ${r%%/ .git/* } "
46
@@ -22,10 +24,10 @@ echo -n "next version: "
2224read nextVersion
2325
2426# set version number in `manifest.json`
25- sed -E -i ' ' " s/\" version\" .*/\" version\" : \" $nextVersion \" ,/" " manifest.json"
27+ sed -E -i -e " s/\" version\" .*/\" version\" : \" $nextVersion \" ,/" " manifest.json"
2628
2729# set version number in `package.json`
28- sed -E -i ' ' " s/\" version\" .*/\" version\" : \" $nextVersion \" ,/" " package.json"
30+ sed -E -i -e " s/^ \" version\" .*/ \" version\" : \" $nextVersion \" ,/" " package.json"
2931
3032# add version number in `versions.json`, assuming same compatibility
3133cat " versions.json" | egrep -v " ^$" | grep -v " }" | sed -e ' $ d' > temp
@@ -35,6 +37,9 @@ echo " \"$nextVersion\": \"$minObsidianVersion\"" >> temp
3537echo " }" >> temp
3638mv temp versions.json
3739
40+ echo " It's time to pause and check. All ready? Press ENTER to continue."
41+ read
42+
3843# push the manifest and versions JSONs
3944git add -A
4045git commit -m " version bump to $nextVersion "
Original file line number Diff line number Diff line change 33 "0.1.2" : " 1.1.16" ,
44 "0.1.3" : " 1.1.16" ,
55 "0.1.4" : " 1.1.16" ,
6- "0.1.5" : " 1.1.16"
6+ "0.1.5" : " 1.1.16" ,
7+ "0.1.6" : " 1.1.16"
78}
You can’t perform that action at this time.
0 commit comments