Skip to content

Commit

Permalink
ci: Added API build and upload step to release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Paulanerus committed Dec 12, 2024
1 parent ed7d1e9 commit 74ae184
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,35 @@ jobs:
- name: Create Release
run: gh release create v${{ steps.extract_version.outputs.ver }} --generate-notes

build-api:
needs: create-release

runs-on: ubuntu-latest

env:
GH_TOKEN: ${{ github.token }}
VERSION: ${{ needs.create-release.outputs.version }}

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4.5.0
with:
java-version: '21'
distribution: 'corretto'
cache: 'gradle'

- name: Extract API Version
run: echo "API_VERSION=$(grep 'api.version=' gradle.properties | cut -d '=' -f2)" >> $GITHUB_ENV

- name: Build API
run: ./gradlew :api:build

- name: Upload API
run: gh release upload v${{ env.VERSION }} api/build/libs/api-${{ API_VERSION }}.jar --clobber

build:
needs: create-release

Expand Down

0 comments on commit 74ae184

Please sign in to comment.