generated from publicodes/model-template
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (52 loc) · 1.46 KB
/
packaging.yaml
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
name: GitHub release and NPM publishing
on:
workflow_run:
workflows: ["Build and test rules"]
branches:
- main
types:
- completed
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- id: install
name: Install dependencies
run: yarn install --frozen-lockfile
- id: compile
name: Compile the rules
run: yarn compile
- id: publish
name: NPM Publish
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
- name: Create Release
if: ${{ steps.publish.outputs.type }}
uses: softprops/action-gh-release@v2
with:
files: dist/*
tag_name: ${{ steps.publish.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build online documentation
if: ${{ steps.publish.outputs.type }}
run: |
yarn install --frozen-lockfile --cwd online-doc
yarn run doc:build
- name: Deploy to GitHub Pages
if: ${{ steps.publish.outputs.type }}
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: online-doc/dist
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}