web/.github/workflows/release-build.yml

131 lines
3.7 KiB
YAML
Raw Normal View History

2021-02-08 11:10:50 +00:00
name: Build Release
on:
push:
tags:
2020-11-06 14:40:23 +00:00
- "v*"
jobs:
build:
2020-11-06 14:40:23 +00:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v2
2020-11-06 14:40:23 +00:00
with:
node-version: "16"
2020-11-06 14:40:23 +00:00
- name: Install Dependencies
run: npm ci
2020-11-06 14:40:23 +00:00
2022-11-20 17:48:24 +00:00
- name: Build Wasm
run: bash ./src/QmcWasm/build-wasm
bash ./src/KgmWasm/build-wasm
2020-11-06 14:40:23 +00:00
- name: Build Legacy
env:
GZIP: "--best"
run: |
npm run build
tar -czf legacy.tar.gz -C ./dist .
2021-02-07 20:24:55 +00:00
cd dist
zip -rJ9 ../legacy.zip *
cd ..
2021-02-08 08:19:49 +00:00
- name: Build Extension (on legacy)
env:
GZIP: "--best"
run: |
2021-02-07 17:47:31 +00:00
npm run make-extension
2021-02-07 20:24:55 +00:00
cd dist
zip -rJ9 ../extension.zip *
cd ..
2020-11-06 14:40:23 +00:00
- name: Build Modern
env:
GZIP: "--best"
run: |
npm run build -- --modern
tar -czf modern.tar.gz -C ./dist .
2021-02-07 20:24:55 +00:00
cd dist
zip -rJ9 ../modern.zip *
cd ..
2020-11-06 14:40:23 +00:00
- 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:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020-11-06 14:40:23 +00:00
with:
tag_name: ${{ github.ref }}
release_name: "Build ${{ steps.date.outputs.date }}"
draft: true
- name: Upload Release Assets - legacy.tar.gz
uses: actions/upload-release-asset@v1
2020-11-06 14:40:23 +00:00
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
uses: actions/upload-release-asset@v1
2020-11-06 14:40:23 +00:00
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
uses: actions/upload-release-asset@v1
2020-11-06 14:40:23 +00:00
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
uses: actions/upload-release-asset@v1
2020-11-06 14:40:23 +00:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020-11-06 14:40:23 +00:00
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./modern.zip
asset_name: modern.zip
asset_content_type: application/zip
2021-02-07 17:47:31 +00:00
- name: Upload Release Assets - extension.zip
uses: actions/upload-release-asset@v1
2021-02-07 17:47:31 +00:00
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
2020-11-06 14:40:23 +00:00
- name: Upload Release Assets - sha256sum.txt
uses: actions/upload-release-asset@v1
2020-11-06 14:40:23 +00:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020-11-06 14:40:23 +00:00
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./sha256sum.txt
asset_name: sha256sum.txt
asset_content_type: text/plain