[Snyk] Security upgrade ethers from 5.7.2 to 6.0.0 #1435
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: ['development', 'master'] | |
pull_request: | |
branches: ['development', 'master'] | |
jobs: | |
cancel-previous: | |
name: 'Cancel Previous Runs' | |
runs-on: ubuntu-latest | |
timeout-minutes: 3 | |
steps: | |
- uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
deploy: | |
if: "!contains(github.event.head_commit.author.name, 'GITHUB_ACTION')" | |
runs-on: ubuntu-latest | |
needs: cancel-previous | |
permissions: | |
contents: write | |
deployments: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_TOKEN }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- name: Set npm credentials | |
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }} | |
- name: Install package | |
run: | | |
npm ci | |
npm run setup | |
- name: Build package | |
run: npm run build | |
- name: Npm run test | |
run: npm run test-rpc | |
env: | |
IPFS_CLUSTER_BASE_URL: ${{ secrets.IPFS_CLUSTER_BASE_URL }} | |
IPFS_CLUSTER_USER: ${{ secrets.IPFS_CLUSTER_USER }} | |
IPFS_CLUSTER_PASSWORD: ${{ secrets.IPFS_CLUSTER_PASSWORD }} | |
- name: Output Run number | |
run: echo ${{ github.run_number }} | |
- name: Deploy on development branch | |
if: github.ref == 'refs/heads/development' | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
RUN_NUMBER: ${{ github.run_number }} | |
run: | | |
npm run publish:canary | |
- name: Deploy on master branch | |
if: github.ref == 'refs/heads/master' | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
git config user.name "GITHUB_ACTION" | |
npm run publish:release | |
sync_master_to_development_branch: | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
needs: deploy | |
permissions: | |
contents: write | |
deployments: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
ref: development | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Commit to develop branch and merge to master branch | |
run: | | |
git config --global user.email ${{ secrets.GH_EMAIL }} | |
git config --global user.name ${{ secrets.GH_USER }} | |
git merge origin/master | |
git push origin development |