2021-02-06 15:41:09 +08:00
|
|
|
name: Release Publish
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
2021-09-01 13:47:02 +08:00
|
|
|
- 'v*' # 正式版本
|
2021-02-06 15:41:09 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish-mirai:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Checkout submodules
|
2021-02-27 14:44:46 +08:00
|
|
|
run: git submodule update --init --recursive
|
2021-02-06 15:41:09 +08:00
|
|
|
|
|
|
|
- name: Set up JDK 1.8
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 1.8
|
|
|
|
|
|
|
|
- name: chmod -R 777 *
|
|
|
|
run: chmod -R 777 *
|
|
|
|
|
|
|
|
- name: Keys setup
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
mkdir build-gpg-sign
|
|
|
|
echo "$GPG_PRIVATE" > build-gpg-sign/keys.gpg
|
|
|
|
echo "$GPG_PUBLIC_" > build-gpg-sign/keys.gpg.pub
|
|
|
|
mkdir build-secret-keys
|
|
|
|
echo "$SONATYPE_USER" > build-secret-keys/sonatype.key
|
|
|
|
echo "$SONATYPE_KEY" >> build-secret-keys/sonatype.key
|
|
|
|
env:
|
|
|
|
GPG_PRIVATE: ${{ secrets.GPG_PRIVATE_KEY }}
|
|
|
|
GPG_PUBLIC_: ${{ secrets.GPG_PUBLIC_KEY }}
|
|
|
|
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
|
|
|
|
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
|
|
|
|
|
2021-02-06 16:38:43 +08:00
|
|
|
- name: Init gradle project
|
2021-02-10 09:48:44 +08:00
|
|
|
run: ./gradlew clean --scan
|
2021-02-06 16:38:43 +08:00
|
|
|
|
2021-02-06 15:41:09 +08:00
|
|
|
- name: Check keys
|
2021-05-25 12:13:43 +08:00
|
|
|
run: ./gradlew ensureMavenCentralAvailable
|
2021-02-06 15:41:09 +08:00
|
|
|
|
|
|
|
- name: fillBuildConstants
|
|
|
|
run: >
|
|
|
|
./gradlew
|
2021-02-10 09:48:44 +08:00
|
|
|
fillBuildConstants --scan
|
2021-02-06 15:41:09 +08:00
|
|
|
|
|
|
|
- name: Assemble
|
2021-06-19 23:58:27 +08:00
|
|
|
run: ./gradlew assemble --scan
|
2021-02-06 15:41:09 +08:00
|
|
|
|
|
|
|
- name: Check
|
2021-05-31 16:14:51 +08:00
|
|
|
run: >
|
2021-06-19 23:58:27 +08:00
|
|
|
./gradlew check --scan
|
2021-07-28 11:45:43 +08:00
|
|
|
-Dmirai.network.show.all.components=true
|
2021-05-31 16:20:09 +08:00
|
|
|
-Dkotlinx.coroutines.debug=on
|
2021-07-28 11:45:43 +08:00
|
|
|
-Dmirai.network.show.packet.details=true
|
2021-02-06 15:41:09 +08:00
|
|
|
|
2021-09-18 18:29:44 +08:00
|
|
|
- name: Publish all artifacts
|
2021-02-06 15:41:09 +08:00
|
|
|
run: >
|
2021-09-18 18:29:44 +08:00
|
|
|
./gradlew publish --info --scan
|
2021-02-06 15:41:09 +08:00
|
|
|
|
2021-02-07 15:28:29 +08:00
|
|
|
- name: Publish Gradle plugin
|
|
|
|
run: >
|
|
|
|
./gradlew
|
2021-02-10 09:48:44 +08:00
|
|
|
:mirai-console-gradle:publishPlugins --scan
|
2021-02-07 15:28:29 +08:00
|
|
|
-Dgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }}
|
|
|
|
-Dgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }} -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}
|
2021-02-06 22:28:09 +08:00
|
|
|
|
2021-09-01 13:47:02 +08:00
|
|
|
- name: Gradle :ci-release-helper:closeRepository
|
2021-02-06 22:28:09 +08:00
|
|
|
run: >
|
|
|
|
./gradlew
|
2021-09-01 13:47:02 +08:00
|
|
|
:ci-release-helper:closeRepository --info --scan
|