mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 04:57:09 +03:00
28
.github/workflows/ci.yml
vendored
28
.github/workflows/ci.yml
vendored
@@ -23,6 +23,10 @@ jobs:
|
||||
with:
|
||||
name: ChromeExtension
|
||||
path: dist
|
||||
- run: mkdir ./builds
|
||||
- uses: montudor/action-zip@v0.1.0
|
||||
with:
|
||||
args: zip -qq -r ./builds/ChromeExtension.zip ./dist
|
||||
|
||||
# Create Firefox artifacts
|
||||
- name: Create Firefox artifacts
|
||||
@@ -31,4 +35,28 @@ jobs:
|
||||
with:
|
||||
name: FirefoxExtension
|
||||
path: dist
|
||||
- uses: montudor/action-zip@v0.1.0
|
||||
with:
|
||||
args: zip -qq -r ./builds/FirefoxExtension.zip ./dist
|
||||
|
||||
# Create Beta artifacts (Builds with the name changed to beta)
|
||||
- name: Create Chrome Beta artifacts
|
||||
run: npm run build:chrome -- --env.stream=beta
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: ChromeExtensionBeta
|
||||
path: dist
|
||||
- uses: montudor/action-zip@v0.1.0
|
||||
with:
|
||||
args: zip -qq -r ./builds/ChromeExtensionBeta.zip ./dist
|
||||
|
||||
- name: Create Firefox Beta artifacts
|
||||
run: npm run build:firefox -- --env.stream=beta
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: FirefoxExtensionBeta
|
||||
path: dist
|
||||
- uses: montudor/action-zip@v0.1.0
|
||||
with:
|
||||
args: zip -qq -r ./builds/FirefoxExtensionBeta.zip ./dist
|
||||
|
||||
|
||||
29
.github/workflows/release.yml
vendored
Normal file
29
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Upload Release Build
|
||||
|
||||
on: release
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Upload Release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Build Artifacts
|
||||
- name: Build Artifacts
|
||||
uses: ./.github/workflows/ci
|
||||
|
||||
# Upload each release asset
|
||||
- name: Upload to release
|
||||
uses: JasonEtco/upload-to-release@master
|
||||
with:
|
||||
args: ./builds/ChromeExtension.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Upload to release
|
||||
uses: JasonEtco/upload-to-release@master
|
||||
with:
|
||||
args: ./builds/FirefoxExtension.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
4
manifest/beta-manifest-extra.json
Normal file
4
manifest/beta-manifest-extra.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "__MSG_betaName__"
|
||||
}
|
||||
|
||||
@@ -428,5 +428,8 @@
|
||||
},
|
||||
"whatUnlistedCheck": {
|
||||
"message": "This setting will significantly slow down SponsorBlock. Sponsor lookups require sending the video ID to the server. If you are concerned about unlisted video IDs being sent over the internet, enable this option."
|
||||
},
|
||||
"betaName": {
|
||||
"message": "BETA - SponsorBlock"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,8 @@ module.exports = env => ({
|
||||
),
|
||||
new BuildManifest({
|
||||
browser: env.browser,
|
||||
pretty: env.mode === "production"
|
||||
pretty: env.mode === "production",
|
||||
stream: env.stream
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
@@ -8,6 +8,7 @@ const fs = require('fs');
|
||||
const manifest = require("../manifest/manifest.json");
|
||||
const firefoxManifestExtra = require("../manifest/firefox-manifest-extra.json");
|
||||
const chromeManifestExtra = require("../manifest/chrome-manifest-extra.json");
|
||||
const betaManifestExtra = require("../manifest/beta-manifest-extra.json");
|
||||
|
||||
// schema for options object
|
||||
const schema = {
|
||||
@@ -18,6 +19,9 @@ const schema = {
|
||||
},
|
||||
pretty: {
|
||||
type: 'boolean'
|
||||
},
|
||||
steam: {
|
||||
type: 'string'
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -40,6 +44,10 @@ class BuildManifest {
|
||||
mergeObjects(manifest, chromeManifestExtra);
|
||||
}
|
||||
|
||||
if (this.options.stream === "beta") {
|
||||
mergeObjects(manifest, betaManifestExtra);
|
||||
}
|
||||
|
||||
let result = JSON.stringify(manifest);
|
||||
if (this.options.pretty) result = JSON.stringify(manifest, null, 2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user