Add action to release zip archives of the app

This commit is contained in:
Stefano Brilli 2021-08-18 11:02:14 +02:00
parent e59b74ae42
commit b82c097ef1
1 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,60 @@
name: Build and Release Zip Archives of Web MiniDisc 💽
on:
push:
tags:
- '*'
jobs:
create-zip-release:
runs-on: ubuntu-20.04
steps:
- name: Install system dependencies 🏗
run: |
sudo apt-get update
sudo apt-get -y install build-essential libudev-dev libusb-1.0-0-dev
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
- name: Build no-ga Release 🔧
run: |
npm install
npm run build
env:
CI: false # Do not treat warnings as errors
PUBLIC_URL: ./
REACT_APP_NO_GA_RELEASE: true # disables service workers and GA
- name: Create Archive 📦
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: 'release-no-ga.zip'
directory: 'build'
exclusions: '.DS_Store service-worker.js final-service-worker.js extra-service-worker.js'
- name: Copy Release Archive
run: mv build/release-no-ga.zip ./
- name: Build Release 🔧
run: npm run build
env:
CI: false # Do not treat warnings as errors
PUBLIC_URL: ./
- name: Create Archive 📦
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: 'release.zip'
directory: 'build'
exclusions: '.DS_Store'
- name: Copy no-g Release Archive
run: mv build/release.zip ./
- uses: ncipollo/release-action@v1
with:
artifacts: "release.zip,release-no-g.zip"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
replacesArtifacts: true