-
Notifications
You must be signed in to change notification settings - Fork 10
46 lines (42 loc) · 1.38 KB
/
publish.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
name: Publish
on:
release:
types: [created]
env:
CYPRESS_MAILOSAUR_API_KEY: ${{ secrets.MAILOSAUR_API_KEY }}
CYPRESS_MAILOSAUR_SERVER: ${{ secrets.MAILOSAUR_SERVER }}
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18.13.0 # Usually lts/* but https://github.com/bahmutov/start-server-and-test/issues/333
- run: npm i && npm run test:ci
publish-npm:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18.13.0 # Usually lts/* but https://github.com/bahmutov/start-server-and-test/issues/333
registry-url: https://registry.npmjs.org/
- name: version
run: |
npm --no-git-tag-version --allow-same-version version `git describe --abbrev=0 --tags`
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- name: Notify on Failure
uses: skitionek/notify-microsoft-teams@master
if: ${{ failure() }}
with:
webhook_url: ${{ secrets.TEAMS_BUILDS_WEBHOOK }}
needs: ${{ toJson(needs) }}
job: ${{ toJson(job) }}
overwrite: "{ title: `${workflow} failed for ${repository.name}` }"