SponsorBlock/.github/workflows/release.yml

81 lines
2.3 KiB
YAML
Raw Normal View History

2020-02-20 18:14:01 +01:00
name: Upload Release Build
on:
release:
types: [published]
2020-02-20 18:14:01 +01:00
jobs:
build:
name: Upload Release
runs-on: ubuntu-latest
steps:
2020-03-09 16:02:14 +01:00
# Initialization
2020-02-28 04:23:33 +01:00
- uses: actions/checkout@v1
2020-03-09 16:02:14 +01:00
- uses: actions/setup-node@v1
- run: npm install
- name: Copy configuration
run: cp config.json.example config.json
# Create Chrome artifacts
- name: Create Chrome artifacts
run: npm run build:chrome
- uses: actions/upload-artifact@v1
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
run: npm run build:firefox
- uses: actions/upload-artifact@v1
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
2020-02-20 18:14:01 +01:00
# Upload each release asset
- name: Upload to release
2020-03-09 16:15:29 +01:00
uses: Shopify/upload-to-release@master
2020-02-20 18:14:01 +01:00
with:
2020-03-09 16:15:29 +01:00
args: builds/ChromeExtension.zip
2020-03-30 20:44:26 +02:00
name: ChromeExtension.zip
2020-04-20 02:59:36 +02:00
path: ./builds/ChromeExtension.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
2020-02-20 18:14:01 +01:00
- name: Upload to release
2020-03-09 16:15:29 +01:00
uses: Shopify/upload-to-release@master
2020-02-20 18:14:01 +01:00
with:
2020-03-09 16:15:29 +01:00
args: builds/FirefoxExtension.zip
2020-03-30 20:44:26 +02:00
name: FirefoxExtension.zip
2020-04-20 02:59:36 +02:00
path: ./builds/FirefoxExtension.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
2020-02-20 18:14:01 +01:00