Skip to content

Publish-Currencies

Publish-Currencies #3

Workflow file for this run

name: Publish-Currencies
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for branch 1 and on start directory, command.txt file changes or by manually running the workflow from actions tab
on:
schedule:
- cron: '0 0 * * *' # every day at midnight
workflow_dispatch:
env: # Or as an environment variable
currlink: ${{ secrets.CURRLINK }}
currlink2: ${{ secrets.CURRLINK2 }}
currlink3: ${{ secrets.CURRLINK3 }}
currlink3key: ${{ secrets.CURRLINK3KEY }}
cryptolink: ${{ secrets.CRYPTOLINK }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '21.6.2'
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
run: |
sudo apt-get update -y
sudo apt-get install swapspace -y
npm i
npx playwright install --with-deps
- name: Running the command
run: node currscript.js
- name: Rerun the command if previous failed
if: failure()
run: node currscript.js
- uses: fawazahmed0/action-debug@forms
with:
credentials: ${{ secrets.DEBUG_U_P }}
formurl: ${{ secrets.FORM_URL }}
formkey: ${{ secrets.FORM_KEY }}
- name: Generate tarball
run: |
7z a package.tar package -ttar
7z a package.tar.gz package.tar -tgzip -mx=9 -aoa -mfb=258 -mmt=on
- name: publish
run: npm publish --access public package.tar.gz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}