Skip to content

Commit

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

jobs:
build:
setup: # sets up repo, gradle, and version
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 @@ -28,9 +23,24 @@ 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 grabVersion # grabVersion stores the version in a special file that GitHub will read
run: ./gradlew publish

- name: capture build artifacts
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit bd24926

Please sign in to comment.