Skip to content

Bump Jscrambler dependency to v6.4.16 #97

Bump Jscrambler dependency to v6.4.16

Bump Jscrambler dependency to v6.4.16 #97

Workflow file for this run

on: [push]
jobs:
unit-tests:
runs-on: ubuntu-latest
name: Unit Tests
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install
run: npm i
- name: Test
run: npm t
protect-e2e-tests:
runs-on: ubuntu-latest
name: Protect e2e Test
environment: production
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install and Build
run: npm i && npm run build
- name: Test
id: jscrambler
uses: ./protect
with:
# USER_ID: 19983
application-id: ${{ secrets.JSCRAMBLER_APPLICATION_ID }}
secret-key: ${{ secrets.JSCRAMBLER_SECRET_KEY }}
access-key: ${{ secrets.JSCRAMBLER_ACCESS_KEY }}
jscrambler-config-path: jscrambler.json
files-src: |
protect/src/utils/__tests__/fixtures/*.js
files-dest: protect/src/utils/__tests__/fixtures-obfuscated/
source-maps: true
source-maps-output-path: protect/src/utils/__tests__/fixtures-extra/
symbol-table-output-path: protect/src/utils/__tests__/fixtures-extra/symbols/
- name: Check protection-id
if: "${{ steps.jscrambler.outputs.protection-id == '' }}"
run: exit 1
- name: Check Generated Files
uses: andstor/file-existence-action@v2
with:
files: "protect/src/utils/__tests__/fixtures-obfuscated/protect/src/utils/__tests__/fixtures/*.js, protect/src/utils/__tests__/fixtures-extra/jscramblerSourceMaps/protect/src/utils/__tests__/fixtures/*.js.map, protect/src/utils/__tests__/fixtures-extra/symbols/*_symbolTable.json"
fail: true
# - name: Upload source maps
# uses: actions/upload-artifact@v3
# with:
# name: source-maps
# path: protect/dist-extra/jscramblerSourceMaps/
# retention-days: 1
release:
name: Release
runs-on: ubuntu-latest
needs: [ unit-tests, protect-e2e-tests ]
if: github.ref_type == 'tag'
steps:
- name: Parse Tag
id: get_version
uses: battila7/get-version-action@v2
- uses: technote-space/release-github-actions@v8
with:
COMMIT_MESSAGE: Built with Jscrambler ${{ steps.get_version.outputs.version }}
DELETE_NODE_MODULES: true
CLEAN_TARGETS: ".[!.]*,__tests__,docs,**/src,*.[jt]s,*.[mc][jt]s,jscrambler.json,tsconfig.json,package-lock.json,*.lock,*.yml,*.yaml"
- uses: ncipollo/release-action@v1
id: release
with:
draft: true
allowUpdates: true
- name: Send mail
uses: dawidd6/action-send-mail@v3
with:
server_address: ${{ secrets.MAIL_SMTP }}
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: "[Action Required] Publish release ${{ steps.get_version.outputs.version }}"
to: code@jscrambler.com
from: "code-integrity-actions"
body: "Publish code-integrity-actions release ${{ steps.get_version.outputs.version }} to the Marketplace - ${{ steps.release.outputs.html_url }}"