Skip to content

Merge pull request #69 from trustwallet/dependabot/npm_and_yarn/word-… #65

Merge pull request #69 from trustwallet/dependabot/npm_and_yarn/word-…

Merge pull request #69 from trustwallet/dependabot/npm_and_yarn/word-… #65

Workflow file for this run

name: Build NPM
on:
push:
branches:
- main
tags:
- "v*.*.*"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
id-token: write
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Install modules
run: npm install
- name: Runs test
run: npm test
- name: Build typescript
run: npm run build:prod
- name: Copy settings
run: |
cp ./creds.json.default ./dist/creds.json
cp ./pow_creds.json.default ./dist/pow_creds.json
cp ./settings.json.default ./dist/settings.json
cp ./token_settings.json.default ./dist/token_settings.json
cp ./user_settings.json.default ./dist/user_settings.json
cp ./package.json ./dist/package.json
- name: Zip Folder
run: zip -r proxy.zip dist/ -x dist/__test__\*
- name: Store NPM version
id: package-version
uses: martinbeentjes/npm-get-version-action@master
- name: Release Drafter
# Run on tag push only.
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
id: release_drafter
uses: release-drafter/release-drafter@v5
with:
name: ${{ steps.package-version.outputs.current-version }}
tag: v${{ steps.package-version.outputs.current-version }}
version: ${{ steps.package-version.outputs.current-version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Asset
# Run on tag push only.
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
id: upload_release_asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release_drafter.outputs.upload_url }} # This pulls ID from the Release Drafter step
asset_path: ./proxy.zip
asset_name: proxy.zip
asset_content_type: application/zip