Skip to content

Commit

Permalink
Remove unnecessary build, parallelize publishing.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnuecke authored Jan 9, 2022
1 parent 0462102 commit 2576b65
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ on:
types: [published]

jobs:
build:
name: publish
publish-github:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -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]
Expand All @@ -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: |
Expand Down

0 comments on commit 2576b65

Please sign in to comment.