-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build and release JAR files | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
upload-jar: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # release changes require contents write | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: "8" | ||
distribution: temurin | ||
|
||
- name: Generate JARs | ||
run: mvn clean package -DskipTests | ||
|
||
- name: Set project version env variable | ||
run: | | ||
echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV | ||
- name: Build and upload JAR | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
gh release upload ${{ github.event.release.tag_name }} target/spark-${{ env.PROJECT_VERSION }}.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters