File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Picviewer CE+ Dist
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ paths :
8+ - ' Picviewer CE*/Picviewer CE*.user.js'
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v4
17+
18+ - name : Replace require paths, add timestamp, and create dist file
19+ run : |
20+ TIMESTAMP=$(date +%s)
21+
22+ sed -e "s#// @require https://update.greasyfork.org/scripts/6158/23710/GM_config%20CN.js#// @require http://hoothin.github.io/UserScripts/Picviewer%20CE%2B/GM_config%20CN.js?v=$TIMESTAMP#" \
23+ -e "s#// @require https://update.greasyfork.org/scripts/438080/1655629/pvcep_rules.js#// @require http://hoothin.github.io/UserScripts/Picviewer%20CE%2B/pvcep_rules.js?v=$TIMESTAMP#" \
24+ -e "s#// @require https://update.greasyfork.org/scripts/440698/1653424/pvcep_lang.js#// @require http://hoothin.github.io/UserScripts/Picviewer%20CE%2B/pvcep_lang.js?v=$TIMESTAMP#" \
25+ "Picviewer CE+/Picviewer CE+.user.js" > "Picviewer CE+/dist.user.js"
26+
27+ - name : Commit and push dist.user.js
28+ uses : stefanzweifel/git-auto-commit-action@v5
29+ with :
30+ commit_message : " chore(Picviewer CE+): Auto-generate dist.user.js with timestamp"
31+ file_pattern : ' Picviewer CE+/dist.user.js'
32+ commit_user_name : GitHub Actions
33+ commit_user_email :
[email protected] 34+ commit_author :
GitHub Actions <[email protected] >
You can’t perform that action at this time.
0 commit comments