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

Commit

Permalink
Create build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
maykar authored Nov 6, 2020
1 parent be4f413 commit 5fd71e1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build on release

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install uglify-js @babel/core @babel/cli @babel/preset-env
- run: npx babel swipe-navigation.js --out-file swipe-navigation.js --presets @babel/preset-env
- run: npx uglify-js swipe-navigation.js -b beautify=false,max_line_len=150 --compress --mangle toplevel --output swipe-navigation.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: ./swipe-navigation.js
asset_name: swipe-navigation.js
asset_content_type: text/javascript

0 comments on commit 5fd71e1

Please sign in to comment.