-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically deploy builds to GitHub Pages
This commit adds three new CI workflows: * 'Validation' builds BSC on pushes and PRs to master. * 'Release' builds BSC whenever a `v` tag is pushed and deploys it to GitHub Pages. It also creates a GitHub release. * 'Nightly' builds BSC Nightly every night and deploys it to GH Pages. (Releases can't be used as the primary deployment medium, because assets are served with `Content-Disposition: attachment`, so new users would be prompted to save the userscript instead of install it.) This is the plan for automatic user migration: 1. We'll also deploy v3.15.0 at the old location. 2. Users should automatically get v3.15.0 as usual. 3. Users should now have the new @updateURL and @downloadurl. 4. The next update check should refer to the new location.
- Loading branch information
1 parent
094f045
commit 5863a22
Showing
5 changed files
with
101 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
prerelease: false | ||
files: | | ||
dist/*.user.js |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
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", | ||
sitename: "SweClockers", | ||
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; |