Merge pull request #2 from aerospike-examples/dev #5
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
# This workflow will build the Java project with Maven and create a Github release | |
name: Release | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'zulu' | |
cache: maven | |
- name: Build with Maven | |
run: mvn package | |
- name: Upload jar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: maven-build-jar | |
path: target/aerospike-circuit-breaker-*-with-dependencies.jar | |
release: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download jar | |
uses: actions/download-artifact@v4 | |
with: | |
name: maven-build-jar | |
path: target/aerospike-circuit-breaker-*-with-dependencies.jar | |
- name: Release to Github | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "target/aerospike-circuit-breaker-*-with-dependencies.jar" | |
generateReleaseNotes: true | |
commit: main | |
tag: ${{ github.sha }} | |
draft: true |