Skip to content

Tag Release

Tag Release #13

Workflow file for this run

name: Tag Release
on:
push:
tags:
- "v*"
jobs:
codecc:
name: Build CodeCC
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
cache-read-only: false
- name: Gradle Build
id: codecc-backend
working-directory: src/backend/codecc
run: |
chmod +x gradlew
./gradlew clean copyToRelease --refresh-dependencies
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: frontend
id: codecc-frontend
run: |
cd src/frontend/devops-codecc
rm -rf dist
npm i --force && npm run build
if [ -f dist/index.html ]; then
mv dist/index.html dist/frontend#index.html
fi
- name: Create artifact - make package
id: create-artifact
run: |
version="$(basename $GITHUB_REF)"
echo "::set-output name=version::$version"
chmod +x scripts/deploy-codecc/packager-codecc.sh
codecc_pkg_dir=/dev/shm/codecc ./scripts/deploy-codecc/packager-codecc.sh "$version" bkcodecc-slim.tar.gz "$PWD"
- uses: actions/upload-artifact@v1
with:
name: codecc
path: bkcodecc-slim.tar.gz
releaseAll:
name: Release All
runs-on: ubuntu-20.04
if: ${{ always() }}
needs: [codecc]
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: bk-codecc ${{ github.ref }}
draft: true
prerelease: true
## codecc
- name: download codecc
uses: actions/download-artifact@v1
with:
name: codecc
path: ./
- name: Upload Release Asset -- CODECC
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bkcodecc-slim.tar.gz
asset_name: bkcodecc-slim.tar.gz
asset_content_type: application/gzip