mirai/.github/workflows/release.yml
2021-09-18 18:29:44 +08:00

77 lines
2.2 KiB
YAML

name: Release Publish
on:
push:
tags:
- 'v*' # 正式版本
jobs:
publish-mirai:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
- 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 }}
- name: Init gradle project
run: ./gradlew clean --scan
- name: Check keys
run: ./gradlew ensureMavenCentralAvailable
- name: fillBuildConstants
run: >
./gradlew
fillBuildConstants --scan
- name: Assemble
run: ./gradlew assemble --scan
- name: Check
run: >
./gradlew check --scan
-Dmirai.network.show.all.components=true
-Dkotlinx.coroutines.debug=on
-Dmirai.network.show.packet.details=true
- name: Publish all artifacts
run: >
./gradlew publish --info --scan
- name: Publish Gradle plugin
run: >
./gradlew
:mirai-console-gradle:publishPlugins --scan
-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 }}
- name: Gradle :ci-release-helper:closeRepository
run: >
./gradlew
:ci-release-helper:closeRepository --info --scan