-
Notifications
You must be signed in to change notification settings - Fork 31
94 lines (77 loc) · 2.55 KB
/
release-visualization.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
name: Release Visualization
on:
push:
tags: 'vis-*.*.*'
jobs:
build_project:
name: Build Project
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install wine
run: |
sudo apt-get update
sudo apt-get install -y wine-stable
- name: Install zip
run: sudo apt-get install -y zip
- name: Enable analysis execution rights
working-directory: ./analysis
run: |
chmod +x ./gradlew
- name: Build visualization
env:
NODE_OPTIONS: "--max_old_space_size=4096"
working-directory: ./visualization
run: |
npm ci
npm run test
npm run build
npm run package
docker build -t codecharta/codecharta-visualization .
- name: Add Changelog Entries to Release
uses: rasmus-saks/[email protected]
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
path: 'visualization/CHANGELOG.md'
title-template: 'Visualization release {version}'
tag-template: 'vis-{version}'
- name: Upload Release Files to tagged release
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["visualization/dist/packages/*.zip"]'
- name: Publish visualization npm package
uses: JS-DevTools/[email protected]
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./visualization/package.json
- name: Set env
run: |
fullVersion="${GITHUB_REF#refs/*/}"
echo "RELEASE_VERSION=${fullVersion:4}" >> $GITHUB_ENV
- name: Publish Docker Visualization Image
uses: elgohr/Publish-Docker-Github-Action@v5
with:
default_branch: main
name: codecharta/codecharta-visualization
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: "latest,${{ env.RELEASE_VERSION }}"
workdir: ./visualization
- name: Create Sample File for Web Demo
run: sh ./script/build_demo_file_visualization.sh
- name: Deploy GH-Pages
uses: JamesIves/[email protected]
with:
token: ${{ secrets.DEPLOY_TOKEN }}
branch: gh-pages
folder: gh-pages
clean: true