| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- # This is a basic workflow to help you get started with Actions
- name: Bintray Publish
- # Controls when the action will run. Triggers the workflow on push or pull request
- # events but only for the master branch
- on:
- release:
- types:
- - created
- # 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:
- - 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: Gradle clean
- run: ./gradlew clean
- - name: Gradle build
- run: ./gradlew build # if test's failed, don't publish
- - name: Check keys
- run: ./gradlew :mirai-core:ensureBintrayAvailable :mirai-core-qqandroid:ensureBintrayAvailable -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }} -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
- - name: Gradle :mirai-core:bintrayUpload
- run: ./gradlew :mirai-core:bintrayUpload -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }} -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
- - name: Gradle :mirai-core-qqandroid:bintrayUpload
- run: ./gradlew :mirai-core-qqandroid:bintrayUpload -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }} -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
- - name: Gradle :mirai-serialization:bintrayUpload
- run: ./gradlew :mirai-serialization:bintrayUpload -Dbintray_user=${{ secrets.BINTRAY_USER }} -Pbintray_user=${{ secrets.BINTRAY_USER }} -Dbintray_key=${{ secrets.BINTRAY_KEY }} -Pbintray_key=${{ secrets.BINTRAY_KEY }}
- # - name: Upload artifact
- # uses: actions/[email protected]
- # with:
- # # Artifact name
- # name: mirai-core
- # # Directory containing files to upload
- # path: "mirai-core/build/libs/mirai-core-*-all.jar"
- # - name: Upload artifact
- # uses: actions/[email protected]
- # with:
- # # Artifact name
- # name: mirai-core-qqandroid-all
- # # Directory containing files to upload
- # path: "mirai-core-qqandroid/build/libs/mirai-core-qqandroid-*-all.jar"
|