From 6215611af27d26d747a409c7b5db2567f65249ad Mon Sep 17 00:00:00 2001 From: Ryan Meek <25127328+maykar@users.noreply.github.com> Date: Fri, 6 Nov 2020 15:42:35 -0500 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 965444d..cc951e4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,9 +9,16 @@ jobs: 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: Set version number + run: | + sed -i 's|*DEV|${{ github.ref }}|g' swipe-navigation.js + sed -i 's|refs/tags/||' swipe-navigation.js + - name: Install deps + run: npm install uglify-js @babel/core @babel/cli @babel/preset-env + - name: Run Babel + run: npx babel swipe-navigation.js --out-file swipe-navigation.js --presets @babel/preset-env + - name: Run Uglify + 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: