generated from ikaros-dev/plugin-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add github action workflow yml configs.
- Loading branch information
li-guohao
committed
Nov 2, 2023
1 parent
9086a3b
commit 97c2ed4
Showing
5 changed files
with
152 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Build FastJar | ||
|
||
# Controls when the workflow will run | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
|
||
release: | ||
if: github.repository == 'ikaros-dev/plugin-bgmtv' | ||
name: Build with java 17 and upload | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Git submodule init | ||
uses: snickerbockers/submodules-init@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
java-version: 17 | ||
- name: Make gradlew executable | ||
run: chmod +x ./gradlew | ||
- name: Clean with gradle | ||
run: | | ||
./gradlew clean | ||
- name: Build console with npm | ||
run: | | ||
./gradlew buildFrontend -x test | ||
- name: Build server with gradle | ||
run: | | ||
./gradlew build -x test | ||
- name: Get Project Version | ||
id: get_version | ||
run: echo "::set-output name=version::$(cat gradle.properties | grep ^version= | cut -d'=' -f2)" | ||
- name: Upload lib jar to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.LI_GUOHAO_TOKEN }} | ||
file: /home/runner/work/plugin-bgmtv/plugin-bgmtv/build/libs/plugin-bgmtv-${{steps.get_version.outputs.version}}.jar | ||
asset_name: plugin-bgmtv-${{steps.get_version.outputs.version}}.jar | ||
|
||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Server CI | ||
|
||
# Controls when the workflow will run | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "**" | ||
- '!console/**' | ||
- "!**.md" | ||
pull_request: | ||
branches: | ||
- master | ||
- release-* | ||
paths: | ||
- "**" | ||
- '!console/**' | ||
- "!**.md" | ||
|
||
jobs: | ||
checkConsole: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
java-version: 17 | ||
- name: Make gradlew executable | ||
run: chmod +x ./gradlew | ||
- name: Build console with npm | ||
run: | | ||
./gradlew buildFrontend -x test | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
java-version: 17 | ||
- name: Make gradlew executable | ||
run: chmod +x ./gradlew | ||
- name: Run tests | ||
run: ./gradlew test | ||
- name: Generate jacoco unit test coverage report xml | ||
run: ./gradlew jacocoTestReport | ||
- name: Upload build dir if current step run failed. | ||
uses: actions/upload-artifact@v3.1.2 | ||
if: ${{ failure() }} | ||
with: | ||
# Artifact name | ||
name: testBuild | ||
# A file, directory or wildcard pattern that describes what to upload | ||
path: /home/runner/work/plugin-bgmtv/plugin-bgmtv/build | ||
# The desired behavior if no files are found using the provided path. | ||
if-no-files-found: warn | ||
# Duration after which artifact will expire in days. 0 means using default retention.Minimum 1 day. Maximum 90 days unless changed from the repository settings page. | ||
retention-days: 7 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Create Release | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- v[0-9]+.* | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: taiki-e/create-gh-release-action@v1 | ||
with: | ||
# (Optional) | ||
changelog: CHANGELOG.MD | ||
# (Optional) Create a draft release. | ||
# [default value: false] | ||
draft: false | ||
# (Optional) Format of title. | ||
# [default value: $tag] | ||
# [possible values: variables $tag, $version, and any string] | ||
title: v$version | ||
# (Required) GitHub token for creating GitHub Releases. | ||
token: ${{ secrets.LI_GUOHAO_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
group=run.ikaros.plugin | ||
description=A bgmtv plugin for ikaros. | ||
version=0.11.7 | ||
version=0.11.8 |
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