Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #20 from KTibow/master
Browse files Browse the repository at this point in the history
Make workflow work better
  • Loading branch information
maykar authored Nov 3, 2020
2 parents ff0b1e2 + 9de0f4f commit a7db881
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 33 deletions.
29 changes: 11 additions & 18 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Build on release

on:
release:
Expand All @@ -9,22 +9,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- run: npm install uglify-js @babel/core @babel/cli @babel/preset-env
- run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "GitHub Actions"
git pull
mkdir -p dist
touch dist/kiosk-mode.js
- run: npx babel kiosk-mode.js --out-file kiosk-mode.js --presets @babel/preset-env
- run: npx uglify-js kiosk-mode.js -b beautify=false,max_line_len=150 --compress --mangle toplevel --output dist/kiosk-mode.js
- run: |
git add dist/kiosk-mode.js
git commit --amend --no-edit || true
git push --force || true
- run: npx uglify-js kiosk-mode.js -b beautify=false,max_line_len=150 --compress --mangle toplevel --output kiosk-mode.js
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./kiosk-mode.js
asset_name: kiosk-mode.js
asset_content_type: text/javascript
15 changes: 0 additions & 15 deletions dist/kiosk-mode.js

This file was deleted.

0 comments on commit a7db881

Please sign in to comment.