mirai/.github/workflows/snapshots.yml
Him188 f90320bd2b
Snapshots publishing (#1465)
* Add snapshots publishing

* fix workflow

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* Create tag on releasing snapshots

* fix

* fix

* fix

* Publish only when tagged `v*`

* MAMOE_TOKEN

* fix

* fix

* Close repository but not publish on release

* Ignore documentations for snapshots publishing

* Update docs for snapshots

* Remove unused newly added files

* Disable all shadow tasks on snapshots publishing

* Remove concurrency limitation for publish-mirai

* fix

* fix

* fix

* Remove publishMiraiCoreArtifactsToMavenLocal
2021-09-01 13:47:02 +08:00

64 lines
1.7 KiB
YAML

name: Snapshots Publish
on:
push:
branches:
- dev
- snapshots-publishing
paths-ignore:
- 'docs/**'
- '**/README*.md'
jobs:
publish-mirai:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git submodule update --init --recursive
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- run: chmod -R 777 *
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v4.8
- 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: 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
- run: >
./gradlew publish --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