2020-03-06 22:32:16 +08:00
|
|
|
# This is a basic workflow to help you get started with Actions
|
|
|
|
|
2020-03-06 22:34:42 +08:00
|
|
|
name: Shadow
|
2020-03-06 22:32:16 +08:00
|
|
|
|
|
|
|
# Controls when the action will run. Triggers the workflow on push or pull request
|
|
|
|
# events but only for the master branch
|
|
|
|
on:
|
2020-03-06 22:33:48 +08:00
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- created
|
2020-03-06 22:32:16 +08:00
|
|
|
|
|
|
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
|
|
jobs:
|
|
|
|
# This workflow contains a single job called "build"
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-03-06 22:33:48 +08:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK 1.8
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
- name: Grant execute permission for gradlew
|
|
|
|
run: chmod +x gradlew
|
|
|
|
- name: Build with Gradle and shadowJar
|
|
|
|
run: ./gradlew :mirai-core:shadowJar :mirai-core-qqandroid:shadowJar
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v1.0.0
|
|
|
|
with:
|
|
|
|
# Artifact name
|
|
|
|
name: mirai-core-all
|
|
|
|
# Directory containing files to upload
|
|
|
|
path: "mirai-core/build/libs/mirai-core-*-all.jar"
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v1.0.0
|
|
|
|
with:
|
|
|
|
# Artifact name
|
|
|
|
name: mirai-core-qqandroid-all
|
|
|
|
# Directory containing files to upload
|
|
|
|
path: "mirai-core-qqandroid/build/libs/mirai-core-qqandroid-*-all.jar"
|