diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 6ff1415..0000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,46 +0,0 @@ -on: - push: - tags: ["v*"] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup PNPM - uses: pnpm/action-setup@v4 - with: - version: 9.4.0 - run_install: true - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - cache: pnpm - node-version: 20.x - - name: Build - run: pnpm build - env: - ENVIRONMENT: ci - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: release - path: | - build/index.user.js - README.md - if-no-files-found: error - - release: - needs: build - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - name: Download artifact - uses: actions/download-artifact@v4 - with: - name: release - - uses: ncipollo/release-action@v1 - with: - artifacts: "build/index.user.js,README.md" diff --git a/.nvim.lua b/.nvim.lua index 65351fe..573d798 100644 --- a/.nvim.lua +++ b/.nvim.lua @@ -84,3 +84,5 @@ overseer.register_template({ }) overseer.run_template({ name = 'dev' }) + +vim.fn.writefile({ "pnpm build", "git add index.user.js" }, ".git/hooks/pre-commit") diff --git a/package.json b/package.json index 546ac68..21f6aea 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,11 @@ }, "scripts": { "dev": "ENVIRONMENT=development tsup --watch", - "build": "tsup", + "build": "tsup && cp -f build/index.user.js .", "serve": "http-server build -a 127.0.0.1 -d false -i false -c-1 -o index.proxy.user.js", "lint": "eslint src/**/*.ts src/*.ts", "lint:fix": "eslint --fix src/**/*.ts src/*.ts", - "release": "npm run build && cp -f build/index.user.js . && git add index.user.js && npm version --force -m 'chore(release): %s' --", + "release": "npm run build && git add index.user.js && npm version --force -m 'chore(release): %s' --", "postversion": "git push & git push --tags" }, "keywords": [],