Skip to content

Merge pull request #52 from TencentBlueKing/feat_change_image_host #28

Merge pull request #52 from TencentBlueKing/feat_change_image_host

Merge pull request #52 from TencentBlueKing/feat_change_image_host #28

Workflow file for this run

name: release
on:
push:
tags:
- 'v*'
env:
FILENAME: CodeCCCheckAtom
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- name: setup npm
uses: actions/setup-node@v2
with:
node-version: '14'
- name: npm install package
run: |
cd src/frontend
pwd
ls -l
npm install
npm run public
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache Gradle
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Gradle Build
uses: eskatos/gradle-command-action@v1
with:
build-root-directory: src/backend/core
gradle-version: 6.7.1
arguments: clean buildZipWithEn -DmavenCredUserName=${{ secrets.NAME }} -DmavenCredPassword=${{ secrets.GITHUB_TOKEN }} -DmavenRepoUrl=http://maven.aliyun.com/nexus/content/groups/public/
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: CodeCCCheckAtom.zip
# A file, directory or wildcard pattern that describes what to upload
path: src/backend/core/build/distributions/CodeCCCheckAtom.zip
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: true
- name: Upload ZH_CN Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: src/backend/core/build/distributions/CodeCCCheckAtom.zip
asset_name: CodeCCCheckAtom.zip
asset_content_type: application/zip
- name: Upload EN Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: src/backend/core/build/distributions/CodeCCCheckAtom_en.zip
asset_name: CodeCCCheckAtom_en.zip
asset_content_type: application/zip