-
Notifications
You must be signed in to change notification settings - Fork 1
181 lines (150 loc) · 5.42 KB
/
-develop.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# name: Build and Publish (EA)
# on:
# push:
# branches:
# - "develop"
# jobs:
# build_and_publish_ea_nodejs:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# node-version: [18.x, 20.x]
# #experimental: [false]
# #include:
# # - node-version: 19.x
# # experimental: true
# #continue-on-error: ${{ matrix.experimental }}
# outputs:
# version: ${{ steps.semver.outputs.version }}
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# cache: "npm"
# cache-dependency-path: nodejs/package-lock.json
# - run: npm i -g typescript ts-node
# working-directory: ./nodejs
# - run: tsc -v ; ts-node -v
# working-directory: ./nodejs
# - run: npm ci
# working-directory: ./nodejs
# - name: semver
# id: semver
# uses: paulhatch/[email protected]
# with:
# tag_prefix: "v"
# branch: develop
# major_pattern: "(MAJOR)"
# minor_pattern: "(MINOR)"
# format: "${major}.${minor}.${patch}-ea.${increment}"
# change_path: "./"
# bump_each_commit: true
# namespace: ""
# - run: rm -f ~/.npmrc ; rm -f ./.npmrc ; echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM2_TOKEN_PUB }}" > ./.npmrc
# working-directory: ./nodejs
# - run: |
# git config user.name "${{ secrets.NPM_NAME }}";
# git config user.email "${{ secrets.NPM_EMAIL }}";
# echo "Hello $(git config --get user.name)";
# - name: output version
# run: |
# echo "Setting version too: ${{ steps.semver.outputs.version }}";
# - run: npm version ${{ steps.semver.outputs.version }}
# working-directory: ./nodejs
# - run: npm run build
# working-directory: ./nodejs
# - run: npm run test
# working-directory: ./nodejs
# - name: Test Report ${{ matrix.node-version }}
# uses: dorny/[email protected]
# with:
# name: Tests
# path: nodejs/junit.json
# reporter: mocha-json
# - name: Upload coverage reports to Codecov
# if: contains(matrix.node-version, '20.x')
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# directory: nodejs/coverage
# - run: cp README.md ./nodejs/README.md
# - run: npm publish --tag ea
# working-directory: ./nodejs
# if: contains(matrix.node-version, '20.x')
# - run: npm pack
# working-directory: ./nodejs
# if: contains(matrix.node-version, '20.x')
# - uses: actions/upload-artifact@v2
# if: contains(matrix.node-version, '20.x')
# with:
# name: published-package
# path: ./nodejs/*.tgz
# - name: cleanup
# if: always()
# run: rm -f ~/.npmrc ; rm -f ./.npmrc;
# docker_build_ea_nodejs:
# needs: [build_and_publish_ea_nodejs, docs_build_ea]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - uses: actions/download-artifact@v2
# with:
# name: published-package
# path: ./nodejs
# - name: Set up QEMU
# uses: docker/setup-qemu-action@master
# with:
# platforms: all
# - name: Set up Docker Buildx
# id: buildx
# uses: docker/setup-buildx-action@master
# - name: Login to DockerHub
# if: github.event_name != 'pull_request'
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_HUB_USER }}
# password: ${{ secrets.DOCKER_HUB_TOKEN }}
# - name: Build
# uses: docker/build-push-action@v2
# with:
# builder: ${{ steps.buildx.outputs.name }}
# context: ./nodejs/
# file: ./nodejs/Dockerfile
# platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
# push: true
# tags: |
# betterweb/service-base:ea-node
# betterweb/service-base:node-${{ needs.build_and_publish_ea_nodejs.outputs.version }}
# docs_build_ea:
# runs-on: ubuntu-latest
# needs: [build_and_publish_ea_nodejs]
# strategy:
# matrix:
# node-version: [20.x]
# # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# cache: "npm"
# cache-dependency-path: documentation/package-lock.json
# - run: npm ci
# working-directory: documentation/
# - run: npm run build
# working-directory: documentation/
# - name: Update site
# uses: cloudflare/[email protected]
# with:
# apiToken: ${{ secrets.CF_API_TOKEN }}
# accountId: ${{ secrets.CF_ACCOUNT_ID }}
# command: pages publish documentation/.vuepress/dist --project-name=bsb-documentation --commit-dirty=true --branch=ea