name: Snapshots Publish on: push: branches: - dev - snapshots-publishing paths-ignore: - 'docs/**' - '**/README*.md' jobs: publish-mirai: runs-on: macos-12 # 14G memory env: enableLocalPublishingTest: 'false' gradleArgs: --scan "-Dmirai.target=android,jvm;macosX64;!other" "-Pkotlin.compiler.execution.strategy=in-process" "-Dfile.encoding=UTF-8" steps: - uses: actions/checkout@v2 - run: git submodule update --init --recursive - uses: actions/setup-java@v2 with: distribution: 'adopt' java-version: '17' - run: chmod -R 777 * - name: Init gradle project run: ./gradlew clean --scan - run: > ./gradlew updateSnapshotVersion --info --scan env: MIRAI_IS_SNAPSHOTS_PUBLISHING: true SNAPSHOTS_PUBLISHING_USER: ${{ secrets.SNAPSHOTS_PUBLISHING_USER }} SNAPSHOTS_PUBLISHING_KEY: ${{ secrets.SNAPSHOTS_PUBLISHING_KEY }} SNAPSHOTS_PUBLISHING_URL: ${{ secrets.SNAPSHOTS_PUBLISHING_URL }} CURRENT_BRANCH_NAME: dev - name: Assemble run: ./gradlew assemble --scan - name: Publish Local Artifacts if: ${{ env.enableLocalPublishingTest == 'true' }} run: ./gradlew :mirai-deps-test:publishMiraiArtifactsToMavenLocal ${{ env.gradleArgs }} "-Dmirai.build.project.version=2.99.0-deps-test" - name: Check run: > ./gradlew check --scan -Dmirai.network.show.all.components=true -Dkotlinx.coroutines.debug=on -Dmirai.network.show.packet.details=true -Dmirai.network.handle.selector.logging=true - run: > ./gradlew publish --no-parallel --info --scan env: MIRAI_IS_SNAPSHOTS_PUBLISHING: true SNAPSHOTS_PUBLISHING_USER: ${{ secrets.SNAPSHOTS_PUBLISHING_USER }} SNAPSHOTS_PUBLISHING_KEY: ${{ secrets.SNAPSHOTS_PUBLISHING_KEY }} SNAPSHOTS_PUBLISHING_URL: ${{ secrets.SNAPSHOTS_PUBLISHING_URL }} CURRENT_BRANCH_NAME: dev - name: Release CI RAM run: pkill java continue-on-error: true - run: > ./gradlew publishSnapshotPage --info env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} continue-on-error: true