2020-05-27 18:24:32 +00:00
|
|
|
name: Release and GitHub Pages
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- "v*"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-07-18 15:25:34 +00:00
|
|
|
|
2020-05-27 18:24:32 +00:00
|
|
|
- name: Use Node.js 12.x
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12.x
|
|
|
|
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: |
|
|
|
|
npm ci
|
|
|
|
npm run fix-compatibility
|
|
|
|
- name: Build Legacy
|
|
|
|
run: |
|
|
|
|
npm run build
|
|
|
|
tar -czf legacy.tar.gz -C ./dist .
|
2020-07-31 17:19:59 +00:00
|
|
|
zip -rJ9 legacy.zip ./dist
|
2020-05-27 18:24:32 +00:00
|
|
|
- name: Build Modern
|
|
|
|
run: |
|
|
|
|
npm run build -- --modern
|
|
|
|
tar -czf modern.tar.gz -C ./dist .
|
2020-07-31 17:19:59 +00:00
|
|
|
zip -rJ9 modern.zip ./dist
|
2020-05-27 18:24:32 +00:00
|
|
|
- run: sha256sum *.tar.gz *.zip > sha256sum.txt
|
|
|
|
|
|
|
|
- name: Deploy
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
publish_dir: ./dist
|
|
|
|
|
2020-08-13 08:01:35 +00:00
|
|
|
- name: Get current time
|
|
|
|
id: date
|
2020-08-13 11:56:45 +00:00
|
|
|
run: echo "::set-output name=date::$(date +'%Y/%m/%d')"
|
2020-08-13 08:01:35 +00:00
|
|
|
|
2020-05-27 18:24:32 +00:00
|
|
|
- name: Create a Release
|
|
|
|
id: create_release
|
|
|
|
uses: actions/create-release@v1
|
2020-07-18 15:25:34 +00:00
|
|
|
env:
|
2020-08-13 08:01:35 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-05-27 18:24:32 +00:00
|
|
|
with:
|
2020-07-18 15:25:34 +00:00
|
|
|
tag_name: ${{ github.ref }}
|
2020-08-13 08:01:35 +00:00
|
|
|
release_name: "Build ${{ steps.date.outputs.date }}"
|
2020-05-27 18:24:32 +00:00
|
|
|
draft: true
|
|
|
|
|
|
|
|
- name: Upload Release Assets - legacy.tar.gz
|
|
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
|
|
env:
|
2020-07-18 15:25:34 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-05-27 18:24:32 +00:00
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
asset_path: ./legacy.tar.gz
|
|
|
|
asset_name: legacy.tar.gz
|
2020-07-18 15:25:34 +00:00
|
|
|
asset_content_type: application/gzip
|
|
|
|
|
2020-05-27 18:24:32 +00:00
|
|
|
- name: Upload Release Assets - legacy.zip
|
|
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
|
|
env:
|
2020-07-18 15:25:34 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-05-27 18:24:32 +00:00
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
asset_path: ./legacy.zip
|
|
|
|
asset_name: legacy.zip
|
|
|
|
asset_content_type: application/zip
|
2020-07-18 15:25:34 +00:00
|
|
|
|
2020-05-27 18:24:32 +00:00
|
|
|
- name: Upload Release Assets - modern.tar.gz
|
|
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
|
|
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
|
2020-07-18 15:25:34 +00:00
|
|
|
|
2020-05-27 18:24:32 +00:00
|
|
|
- name: Upload Release Assets - modern.zip
|
|
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
asset_path: ./modern.zip
|
|
|
|
asset_name: modern.zip
|
|
|
|
asset_content_type: application/zip
|
2020-07-18 15:25:34 +00:00
|
|
|
|
2020-05-27 18:24:32 +00:00
|
|
|
- name: Upload Release Assets - sha256sum.txt
|
|
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
asset_path: ./sha256sum.txt
|
|
|
|
asset_name: sha256sum.txt
|
|
|
|
asset_content_type: text/plain
|
2020-07-18 15:25:34 +00:00
|
|
|
|