File tree 1 file changed +66
-0
lines changed
1 file changed +66
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build Obsidian Plugin Beta
2
+
3
+ on : workflow_dispatch
4
+
5
+ env :
6
+ PLUGIN_NAME : obsidian-ribbon-divider
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v4
12
+ with :
13
+ ref : " beta"
14
+ - name : Use Node.js
15
+ uses : actions/setup-node@v1
16
+ with :
17
+ node-version : " 20.x"
18
+ - name : Get Package Version
19
+ id : get_package_version
20
+ run : echo "PACKAGE_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV
21
+ - name : Build
22
+ id : build
23
+ run : |
24
+ echo Building for version PACKAGE_VERSION
25
+ npm ci
26
+ npm run build
27
+ zip -jr ${{ env.PLUGIN_NAME }}-${{ env.PACKAGE_VERSION }}.zip dist/*
28
+ ls
29
+ - name : Release
30
+ uses : softprops/action-gh-release@v1
31
+ with :
32
+ tag_name : ${{ env.PACKAGE_VERSION }}
33
+ prerelease : true
34
+ files : |
35
+ ${{ env.PLUGIN_NAME }}-${{ env.PACKAGE_VERSION }}.zip
36
+ dist/main.js
37
+ dist/manifest.json
38
+ dist/styles.css
39
+ - name : Create beta manifest
40
+ id : createbetamanifest
41
+ run : |
42
+ cp -f manifest.json manifest-beta.json
43
+ - name : Upload manifest-beta.json
44
+ uses : actions/upload-artifact@v4
45
+ with :
46
+ name : manifest-beta
47
+ path : manifest-beta.json
48
+ update_mainifest_beta_main :
49
+ runs-on : ubuntu-latest
50
+ needs : build
51
+ steps :
52
+ - uses : actions/checkout@v4
53
+ with :
54
+ ref : " main"
55
+ - name : Download manifest-beta
56
+ uses : actions/download-artifact@v4
57
+ with :
58
+ name : manifest-beta
59
+ - name : Commit
60
+ id : commit
61
+ run : |
62
+ git config --local user.name 'Github Actions'
63
+ git config --local user.email 'noreply@github.com'
64
+ git add .
65
+ git commit -m "Update manifest-beta.json"
66
+ git push
You can’t perform that action at this time.
0 commit comments