Skip to content

Commit

Permalink
add mc, npm, and github upload in github ci
Browse files Browse the repository at this point in the history
  • Loading branch information
gciatto committed Oct 24, 2020
1 parent 64294f4 commit 9f3318a
Showing 1 changed file with 102 additions and 2 deletions.
104 changes: 102 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
name: api-references
path: build/dokka/htmlMultiModule

deploy-maven-github:
deploy-maven:
runs-on: ubuntu-latest
needs:
- build
Expand Down Expand Up @@ -179,6 +179,106 @@ jobs:
- name: Publish on Bintray Maven Repo
run: gradle ${{ env.gradle-options }} publishAllToBintray --parallel
env:
ORG_GRADLE_PROJECT_sonatypeUrl: https://maven.pkg.github.com/$${{ github.repository }}
ORG_GRADLE_PROJECT_bintrayUser: ${{ secrets.BINTRAY_USER }}
ORG_GRADLE_PROJECT_bintrayKey: ${{ secrets.BINTRAY_USER }}

- name: Publish on Maven Central Repo
run: gradle ${{ env.gradle-options }} publishAllToBintray --parallel
if: contains(github.ref, "master")
env:
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}

deploy-npm:
runs-on: ubuntu-latest
needs:
- build
steps:
# - *checkout_code
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0 # all history

# - *cache_jdk
- name: Cache JDK
uses: actions/cache@v2
with:
path: ~/.jabba
key: ${{ runner.os }}-jdk-${{ env.jdk-version }}
restore-keys: |
${{ runner.os }}-jdk-
${{ runner.os }}-
# - *install_jdk
- uses: battila7/jdk-via-jabba@v1
name: Restore JDK
with:
jdk: ${{ env.jdk-version }}

# - *cache_gradle
- name: Cache Gradle Data
uses: actions/cache@v2
with:
path: |
~/.m2/repository
~/.gradle/caches
~/gradle/wrapper
**/build
**/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
${{ runner.os }}-
- name: Publish on NPM
run: gradle ${{ env.gradle-options }} npmPublish
env:
ORG_GRADLE_PROJECT_npmToken: ${{ secrets.NPM_TOKEN }}

deploy-github:
runs-on: ubuntu-latest
needs:
- build
steps:
# - *checkout_code
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0 # all history

# - *cache_jdk
- name: Cache JDK
uses: actions/cache@v2
with:
path: ~/.jabba
key: ${{ runner.os }}-jdk-${{ env.jdk-version }}
restore-keys: |
${{ runner.os }}-jdk-
${{ runner.os }}-
# - *install_jdk
- uses: battila7/jdk-via-jabba@v1
name: Restore JDK
with:
jdk: ${{ env.jdk-version }}

# - *cache_gradle
- name: Cache Gradle Data
uses: actions/cache@v2
with:
path: |
~/.m2/repository
~/.gradle/caches
~/gradle/wrapper
**/build
**/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
${{ runner.os }}-
- name: Publish GitHub Release
run: gradle ${{ env.gradle-options }} githubRelease
env:
ORG_GRADLE_PROJECT_githubToken: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9f3318a

Please sign in to comment.