-
Notifications
You must be signed in to change notification settings - Fork 32
77 lines (63 loc) · 2.11 KB
/
release-analysis.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
name: Release Analysis
on:
push:
tags: 'ana-*.*.*'
jobs:
build_project:
name: Build Project and Release
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: '20'
- name: Build analysis
working-directory: ./analysis
run: |
chmod +x ./gradlew
./gradlew build
docker build -t codecharta/codecharta-analysis .
- name: Add Changelog Entries to Release
uses: rasmus-saks/[email protected]
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
path: 'analysis/CHANGELOG.md'
title-template: 'Analysis release {version}'
tag-template: 'ana-{version}'
- name: Upload Release Files to tagged release
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["analysis/build/distributions/*.tar"]'
- name: Publish analysis npm package
uses: JS-DevTools/[email protected]
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./analysis/node-wrapper/package.json
- name: Set env
run: |
fullVersion="${GITHUB_REF#refs/*/}"
echo "RELEASE_VERSION=${fullVersion:4}" >> $GITHUB_ENV
- name: Publish Docker Analysis Image
uses: elgohr/Publish-Docker-Github-Action@v5
with:
default_branch: main
name: codecharta/codecharta-analysis
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: "latest,${{ env.RELEASE_VERSION }}"
workdir: ./analysis
- name: Create Sample File for Web Demo
run: sh ./script/build_demo_file_analysis.sh
- name: Deploy GH-Pages
uses: JamesIves/[email protected]
with:
token: ${{ secrets.DEPLOY_TOKEN }}
branch: gh-pages
folder: gh-pages
clean: true