diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml new file mode 100644 index 0000000..0226144 --- /dev/null +++ b/.github/workflows/nightly.yaml @@ -0,0 +1,33 @@ +name: Nightly + +on: + schedule: + - cron: '0 2 * * *' + +jobs: + nightly: + name: Nightly Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 12.x + - name: Build + run: | + npm ci + npm run build + env: + CI: true + USERSCRIPTER_HOSTED_AT: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/nightly # Must match TARGET_FOLDER. + USERSCRIPTER_MODE: production + USERSCRIPTER_NIGHTLY: true + USERSCRIPTER_VERBOSE: true + - name: Deploy + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: dist + TARGET_FOLDER: nightly # Must match USERSCRIPTER_HOSTED_AT. diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml deleted file mode 100644 index a7d4b1d..0000000 --- a/.github/workflows/nodejs.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Node CI - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [10.x, 12.x] - - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: npm install, build, and test - run: | - npm ci - npm run verify - env: - CI: true diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..bc53d02 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,38 @@ +name: Release + +on: + push: + tags: + - v* + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 12.x + - name: Build + run: | + npm ci + npm run build + env: + CI: true + USERSCRIPTER_MODE: production + USERSCRIPTER_VERBOSE: true + - name: Deploy + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: dist + - name: Create GitHub release + uses: marvinpinto/action-automatic-releases@v1.0.0 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + prerelease: false + files: | + dist/*.user.js diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml new file mode 100644 index 0000000..9272aae --- /dev/null +++ b/.github/workflows/validation.yaml @@ -0,0 +1,28 @@ +name: Validation + +on: [push, pull_request] + +jobs: + validation: + name: Validation Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 12.x + - name: Build (development) + run: | + npm ci + npm run build + env: + CI: true + USERSCRIPTER_VERBOSE: true + - name: Build (production) + run: | + npm run build + env: + CI: true + USERSCRIPTER_MODE: production + USERSCRIPTER_VERBOSE: true diff --git a/src/userscript.ts b/src/userscript.ts index a35f84b..1dbf589 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -1,7 +1,7 @@ export default { id: "better-sweclockers", name: "Better SweClockers", - version: "3.14.1", + version: "3.15.0", description: "Extra functionality and improved usability for the SweClockers website.", author: "Simon Alling", hostname: "sweclockers.com", @@ -9,5 +9,5 @@ export default { namespace: "simonalling.se", runAt: "document-start", noframes: true, // because SweClockers has frames with `src=""` - hostedAt: "https://simonalling.github.io/userscripts/", + hostedAt: "https://simonalling.github.io/better-sweclockers/", } as const;