From b82c097ef12add1dfa9bffb3268fdb33ed1ea307 Mon Sep 17 00:00:00 2001 From: Stefano Brilli Date: Wed, 18 Aug 2021 11:02:14 +0200 Subject: [PATCH] Add action to release zip archives of the app --- .github/workflows/create-zip-release.yml | 60 ++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/create-zip-release.yml diff --git a/.github/workflows/create-zip-release.yml b/.github/workflows/create-zip-release.yml new file mode 100644 index 0000000..c895d50 --- /dev/null +++ b/.github/workflows/create-zip-release.yml @@ -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