-
-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (58 loc) Β· 1.41 KB
/
test.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
on: [push, pull_request]
name: test
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
deno: ["v1.x"]
os: [ubuntu-latest, macOS-latest, windows-latest]
name: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno }}
- name: Env
run: |
deno --version
- name: Format
if: runner.os != 'Windows'
env:
RUST_BACKTRACE: 1
run: |
make format
- name: Test
env:
RUST_BACKTRACE: 1
run: |
make test
- name: Bundle
run: make bundle
release:
name: Release to Github
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'axetroy/swagger2ts'
needs: [test]
runs-on: ubuntu-latest
strategy:
matrix:
deno: ["v1.x"]
steps:
- uses: actions/checkout@v2
- name: Setup deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno }}
- name: Bundle
run: make bundle
- name: Bump version
env:
GITHUB_REF: ${{ github.ref }}
run: |
node ./script/bump.mjs
- name: Publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
package: ./package.json
token: ${{ secrets.NPM_TOKEN }}