-
Notifications
You must be signed in to change notification settings - Fork 5
67 lines (56 loc) · 2.35 KB
/
fetch_token_list.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
name: Fetch token list
on:
push:
branches:
- master
jobs:
fetch-list:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use node_modules cache
uses: actions/cache@v2
id: npm-cache
with:
path: |
node_modules
key: npm-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
- name: NPM install
run: npm install
if: steps.npm-cache.outputs.cache-hit != 'true'
- name: Fetch Token Lists
run: |
npm run build
- name: Get Package Version
id: package-version
uses: martinbeentjes/npm-get-version-action@master
- name: Create version folder
run: |
cp -r ./dist/latest ./dist/v${{ steps.package-version.outputs.current-version }}
- name: Tag Package Version
run: git tag v${{ steps.package-version.outputs.current-version }}
- name: Create Release Package
uses: montudor/action-zip@v1
with:
args: zip -qq -r v${{ steps.package-version.outputs.current-version }}.zip dist/v${{
steps.package-version.outputs.current-version }}
- name: Upload Latest Release
uses: actions/upload-artifact@v4
with:
name: v${{ steps.package-version.outputs.current-version }}.zip
path: v${{ steps.package-version.outputs.current-version }}.zip
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: v${{ steps.package-version.outputs.current-version }}.zip
asset_name: v${{ steps.package-version.outputs.current-version }}.zip
tag: v${{ steps.package-version.outputs.current-version }}
overwrite: true
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
keep_files: true
cname: tokens.r2d2.to