Skip to content

Release Analysis

Release Analysis #3

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: '18'
- 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