You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
129 lines
3.6 KiB
YAML
129 lines
3.6 KiB
YAML
4 years ago
|
name: Build Release
|
||
5 years ago
|
|
||
|
on:
|
||
|
push:
|
||
|
tags:
|
||
4 years ago
|
- "v*"
|
||
5 years ago
|
|
||
|
jobs:
|
||
|
build:
|
||
4 years ago
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
5 years ago
|
|
||
4 years ago
|
- name: Use Node.js 14.x
|
||
4 years ago
|
uses: actions/setup-node@v2
|
||
4 years ago
|
with:
|
||
4 years ago
|
node-version: "14"
|
||
4 years ago
|
|
||
|
- name: Install Dependencies
|
||
|
run: |
|
||
|
npm ci
|
||
|
npm run fix-compatibility
|
||
|
|
||
|
- name: Build Legacy
|
||
|
env:
|
||
|
GZIP: "--best"
|
||
|
run: |
|
||
|
npm run build
|
||
|
tar -czf legacy.tar.gz -C ./dist .
|
||
4 years ago
|
cd dist
|
||
|
zip -rJ9 ../legacy.zip *
|
||
|
cd ..
|
||
4 years ago
|
|
||
|
- name: Build Extension (on legacy)
|
||
|
env:
|
||
|
GZIP: "--best"
|
||
|
run: |
|
||
4 years ago
|
npm run make-extension
|
||
4 years ago
|
cd dist
|
||
|
zip -rJ9 ../extension.zip *
|
||
|
cd ..
|
||
4 years ago
|
|
||
|
- name: Build Modern
|
||
|
env:
|
||
|
GZIP: "--best"
|
||
|
run: |
|
||
|
npm run build -- --modern
|
||
|
tar -czf modern.tar.gz -C ./dist .
|
||
4 years ago
|
cd dist
|
||
|
zip -rJ9 ../modern.zip *
|
||
|
cd ..
|
||
4 years ago
|
|
||
|
- name: Checksum
|
||
|
run: sha256sum *.tar.gz *.zip > sha256sum.txt
|
||
|
|
||
|
- name: Get current time
|
||
|
id: date
|
||
|
run: echo "::set-output name=date::$(date +'%Y/%m/%d')"
|
||
|
|
||
|
- name: Create a Release
|
||
|
id: create_release
|
||
|
uses: actions/create-release@v1
|
||
|
env:
|
||
5 years ago
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
4 years ago
|
with:
|
||
|
tag_name: ${{ github.ref }}
|
||
|
release_name: "Build ${{ steps.date.outputs.date }}"
|
||
|
draft: true
|
||
|
|
||
|
- name: Upload Release Assets - legacy.tar.gz
|
||
4 years ago
|
uses: actions/upload-release-asset@v1
|
||
4 years ago
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
with:
|
||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||
|
asset_path: ./legacy.tar.gz
|
||
|
asset_name: legacy.tar.gz
|
||
|
asset_content_type: application/gzip
|
||
|
|
||
|
- name: Upload Release Assets - legacy.zip
|
||
4 years ago
|
uses: actions/upload-release-asset@v1
|
||
4 years ago
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
with:
|
||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||
|
asset_path: ./legacy.zip
|
||
|
asset_name: legacy.zip
|
||
|
asset_content_type: application/zip
|
||
|
|
||
|
- name: Upload Release Assets - modern.tar.gz
|
||
4 years ago
|
uses: actions/upload-release-asset@v1
|
||
4 years ago
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
with:
|
||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||
|
asset_path: ./modern.tar.gz
|
||
|
asset_name: modern.tar.gz
|
||
|
asset_content_type: application/gzip
|
||
|
|
||
|
- name: Upload Release Assets - modern.zip
|
||
4 years ago
|
uses: actions/upload-release-asset@v1
|
||
4 years ago
|
env:
|
||
5 years ago
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
4 years ago
|
with:
|
||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||
|
asset_path: ./modern.zip
|
||
|
asset_name: modern.zip
|
||
|
asset_content_type: application/zip
|
||
|
|
||
4 years ago
|
- name: Upload Release Assets - extension.zip
|
||
4 years ago
|
uses: actions/upload-release-asset@v1
|
||
4 years ago
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
with:
|
||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||
|
asset_path: ./extension.zip
|
||
|
asset_name: extension.zip
|
||
|
asset_content_type: application/zip
|
||
|
|
||
4 years ago
|
- name: Upload Release Assets - sha256sum.txt
|
||
4 years ago
|
uses: actions/upload-release-asset@v1
|
||
4 years ago
|
env:
|
||
5 years ago
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
4 years ago
|
with:
|
||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||
|
asset_path: ./sha256sum.txt
|
||
|
asset_name: sha256sum.txt
|
||
|
asset_content_type: text/plain
|