-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unnecessary build, parallelize publishing.
- Loading branch information
Showing
1 changed file
with
29 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,7 @@ on: | |
types: [published] | ||
|
||
jobs: | ||
build: | ||
name: publish | ||
publish-github: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -33,11 +32,6 @@ jobs: | |
~/.gradle/wrapper | ||
key: ubuntu-latest-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: ubuntu-latest-gradle- | ||
- name: Build with Gradle | ||
run: ./gradlew -Psemver='${{ steps.split_tag.outputs._1 }}' build | ||
env: | ||
GPR_USER: ${{ secrets.GPR_USER }} | ||
GPR_KEY: ${{ secrets.GPR_KEY }} | ||
|
||
- name: Add Artifacts to Github Release | ||
uses: alexellis/[email protected] | ||
|
@@ -54,6 +48,34 @@ jobs: | |
GITHUB_MAVEN_URL: 'https://maven.pkg.github.com/${{ github.repository }}' | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish-curse: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Extract Version from Tag | ||
uses: rishabhgupta/split-by@v1 | ||
id: split_tag | ||
with: | ||
string: ${{ github.event.release.tag_name }} | ||
split-by: '/' | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Validate Gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ubuntu-latest-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: ubuntu-latest-gradle- | ||
|
||
# Set Curseforge release type based on pre-release flag. | ||
- name: Set release type to 'release' | ||
run: | | ||
|