mirror of
https://github.com/SwingTheVine/Wplace-BlueMarble.git
synced 2026-05-07 16:49:44 +00:00
42 lines
No EOL
1.1 KiB
YAML
42 lines
No EOL
1.1 KiB
YAML
name: Build and Deploy Userscript
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Update userscript version
|
|
run: |
|
|
npm version minor --no-git-tag-version
|
|
node update-version.js
|
|
|
|
- name: Build userscript
|
|
run: npm run build
|
|
|
|
- name: Commit and push built script
|
|
run: |
|
|
git config --global user.name "github-actions[bot]"
|
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
|
|
git add dist/*.user.js
|
|
git add BlueMarble.meta.js
|
|
git add package.json
|
|
git commit -m "ci: build and deploy userscript [skip ci]" || echo "No changes to commit"
|
|
git push
|
|
|