-
Notifications
You must be signed in to change notification settings - Fork 11
54 lines (45 loc) · 1.48 KB
/
ci_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
47
48
49
50
51
52
53
54
name: Publish
on:
push:
branches:
- develop
- master
jobs:
ci_publish:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
token: ${{ secrets.DSI_HUG_BOT_GITHUB_TOKEN }}
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/
- name: Install latest npm
run: npm install -g npm@latest
- name: Install dependencies
run: npm clean-install
- name: Build
run: npm run build:lib
- name: Lint
run: npm run lint
- name: Semantic Release
env:
NODE_AUTH_TOKEN: ${{ secrets.DSI_HUG_NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.DSI_HUG_NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.DSI_HUG_BOT_GITHUB_TOKEN }}
GIT_AUTHOR_NAME: dsi-hug-bot
GIT_AUTHOR_EMAIL: dsi-hug-github@hcuge.ch
GIT_COMMITTER_NAME: dsi-hug-bot
GIT_COMMITTER_EMAIL: dsi-hug-github@hcuge.ch
run: npm run release:ci
- name: Merge release back to develop
if: github.ref == 'refs/heads/master'
uses: everlytic/branch-merge@1.1.2
with:
github_token: ${{ secrets.DSI_HUG_BOT_GITHUB_TOKEN }}
source_ref: 'master'
target_branch: 'develop'
commit_message_template: 'merge branch {source_ref} of github.com:DSI-HUG/dejajs-components into {target_branch} [skip ci]'