-
Notifications
You must be signed in to change notification settings - Fork 40
69 lines (54 loc) · 2.11 KB
/
run.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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 }}
# - name: unpublish older version
# run: npm unpublish @fawazahmed0/currency-api@`date -d "94 days ago" -I | tr '-' '.'`
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}