Releasing ana-1.124.0 #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/release-a-changelog-action@v1.2.0 | |
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/upload-assets@0.4.0 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
asset_paths: '["analysis/build/distributions/*.tar"]' | |
- name: Publish analysis npm package | |
uses: JS-DevTools/npm-publish@v2.2.2 | |
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/github-pages-deploy-action@v4.4.3 | |
with: | |
token: ${{ secrets.DEPLOY_TOKEN }} | |
branch: gh-pages | |
folder: gh-pages | |
clean: true |