Skip to content

Commit

Permalink
Separate publish and release in release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jadelily18 committed Nov 2, 2023
1 parent c6fa719 commit 4aa6c39
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ jobs:
# and run on both Linux and Windows
os: [ubuntu-20.04, windows-2022]
runs-on: ${{ matrix.os }}
env:
REPO_USER: ${{ secrets.REPO_USER }}
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
steps:
- name: checkout repository
uses: actions/checkout@v2
Expand Down
22 changes: 19 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
REPO_USER: ${{ secrets.MAVEN_USERNAME }}
REPO_TOKEN: ${{ secrets.MAVEN_PASSWORD }}
steps:
- name: Setup Java 17
uses: actions/setup-java@v3
Expand All @@ -26,4 +24,22 @@ jobs:
- name: Checkout Repository Files
uses: actions/checkout@v4
- name: Run release
run: peony mod -d --gradle-args="build publish"
run: peony mod -d
publish:
runs-on: ubuntu-latest
name: Publish to Maven repository
env:
REPO_USER: ${{ secrets.MAVEN_USERNAME }}
REPO_TOKEN: ${{ secrets.MAVEN_PASSWORD }}
steps:
- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Checkout Repository Files
uses: actions/checkout@v4
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: Run publish task
run: ./gradlew publish

0 comments on commit 4aa6c39

Please sign in to comment.