-
Notifications
You must be signed in to change notification settings - Fork 1
107 lines (91 loc) · 2.89 KB
/
release.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Github + NPM Release
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
env:
TEST_PINATAAPIKEY: ${{ secrets.TEST_PINATAAPIKEY }}
TEST_PINATASECRETAPIKEY: ${{ secrets.TEST_PINATASECRETAPIKEY }}
TEST_PINATAJWTKEY: ${{ secrets.TEST_PINATAJWTKEY }}
TEST_INFURA_API_KEY_NAME: ${{ secrets.TEST_INFURA_API_KEY_NAME }}
TEST_INFURA_API_KEY: ${{ secrets.TEST_INFURA_API_KEY }}
TEST_INFURA_GATEWAY: ${{ secrets.TEST_INFURA_GATEWAY }}
TEST_SHARED_KEY: ${{ secrets.TEST_SHARED_KEY }}
steps:
- uses: actions/checkout@v3
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
bump-minor-pre-major: true
default-branch: main
command: manifest
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: "8.8.0"
- name: Use Node.js '18.19.0'
uses: actions/setup-node@v2
with:
node-version: "18.19.0"
registry-url: "https://registry.npmjs.org"
scope: "@lukso"
cache: "pnpm"
- name: Setup Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install pnpm/forge
run: |
git submodule update --init --recursive
pnpm install
cd packages/data-provider-fetcher
forge install
- name: Install Dependencies
run: pnpm install
# `npm run build:js` will also generate the auto-generated constants for methods, errors and events,
# including extracting their devdocs and userdocs
- name: Prepare artifacts to publish
run: pnpm run build
- name: Tests
run: pnpm run test
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: 🧪 Run Tests in shell
run: |
bun install
node examples/upload-pinata-proxy.mjs
bun examples/upload-pinata-proxy.mjs
node examples/upload-pinata.mjs
bun examples/upload-pinata.mjs
node examples/upload-infura.mjs
bun examples/upload-infura.mjs
- name: Colled documentation
run: |
pnpm run documentation
- name: Deploy
# if: ${{ steps.release.outputs.release_created }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
enable_jekyll: true
- run: |
(cat <<END > outputs.json
${{toJSON(steps.release.outputs)}}
END
)
node ./scripts/publish.mjs outputs.json
if: ${{ steps.release.outputs.releases_created }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}