Skip to content

Commit

Permalink
actions pain #4
Browse files Browse the repository at this point in the history
  • Loading branch information
TropheusJ committed Feb 20, 2024
1 parent 91fb0a1 commit e60281a
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@ name: release
on: workflow_dispatch

jobs:
setup: # sets up repo, gradle, and version
build:
strategy:
matrix:
java: [ 17 ]
runs-on: ubuntu-latest
env:
MAVEN_TYPE: releases
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
outputs:
version: ${{ steps.publish.outputs.version }}
steps:

- name: checkout repository
uses: actions/checkout@v3

Expand All @@ -23,24 +28,9 @@ jobs:
java-version: 17
cache: gradle

# stores the version in a special file that GitHub will read for outputs
- name: store version
run: ./gradlew grabVersion

build:
strategy:
matrix:
java: [ 17 ]
runs-on: ubuntu-latest
env:
MAVEN_TYPE: releases
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
needs: [ setup ]
steps:
- name: publish
id: publish
run: ./gradlew publish
run: ./gradlew publish grabVersion # grabVersion stores the version in a special file that GitHub will read

- name: capture build artifacts
uses: actions/upload-artifact@v3
Expand All @@ -59,8 +49,8 @@ jobs:

modrinth-featured: false # leave it to auto featuring

name: ${{ needs.setup.outputs.version }}
version: ${{ needs.setup.outputs.version }}
name: ${{ steps.publish.outputs.version }}
version: ${{ steps.publish.outputs.version }}

loaders: |
fabric
Expand Down

0 comments on commit e60281a

Please sign in to comment.