-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.3 KB
/
build-providers.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
name: Build Providers
on:
workflow_dispatch:
repository_dispatch:
types: [build-project]
jobs:
build:
runs-on: ubuntu-latest
environment:
name: CI
permissions:
contents: read
deployments: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- uses: pnpm/action-setup@v3
with:
version: 9.14.4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install packages
run: pnpm install --frozen-lockfile
- name: Build provider library
run: |
pnpm run build
# Make sure the build runs inside the 'providers' submodule directory
working-directory: providers
- name: Build provider umd module
run: webpack --config build-umd-module.js
working-directory: ${{ github.workspace }}
- name: Upload providers umd module to API
run: |
curl -X PUT \
-H "X-Custom-Auth-Key: $MY_KEY" \
--data-binary @provider.min.js \
https://r2-api.mayor.workers.dev/provider.min.js
working-directory: dist
env:
MY_KEY: ${{ secrets.MY_KEY }}