Update Picviewer CE+.user.js #20
This file contains hidden or 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
| name: Build Picviewer CE+ Dist | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'Picviewer CE*/Picviewer CE*.user.js' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Replace require paths, add timestamp, and create dist file | |
| run: | | |
| sed -E \ | |
| -e "s#https://update.greasyfork.org/scripts/6158/([0-9]+)/GM_config%20CN.js#https://hoothin.github.io/UserScripts/Picviewer%20CE%2B/GM_config%20CN.js?v=\1#g" \ | |
| -e "s#https://update.greasyfork.org/scripts/438080/([0-9]+)/pvcep_rules.js#https://hoothin.github.io/UserScripts/Picviewer%20CE%2B/pvcep_rules.js?v=\1#g" \ | |
| -e "s#https://update.greasyfork.org/scripts/440698/([0-9]+)/pvcep_lang.js#https://hoothin.github.io/UserScripts/Picviewer%20CE%2B/pvcep_lang.js?v=\1#g" \ | |
| "Picviewer CE+/Picviewer CE+.user.js" > "Picviewer CE+/dist.user.js" | |
| - name: Commit and push dist.user.js | |
| run: | | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "hoothin-update" | |
| git add "Picviewer CE+/dist.user.js" | |
| git commit -m "chore(Picviewer CE+): Auto-generate dist.user.js with timestamp" | |
| git push https://${{ secrets.ACTION_SECRET }}@github.com/${{ github.repository }} |