diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..058aaed --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,29 @@ +name: 'build test' + +on: + push: + branches: [ main ] + pull_request: + branches: [ '*' ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + java: [ 11, 17, 21 ] + + steps: + - name: Checkout... + uses: actions/checkout@v4 + + - name: Set up JDK... + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: 'maven' + + - name: Build and test... + run: mvn clean verify -U diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f517d1c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: 'create release' + +on: + push: + tags: + - '[0-9]+.[0-9]+*' + +jobs: + prepare-release: + runs-on: ubuntu-latest + + outputs: + tag: ${{ steps.vars.outputs.tag }} + version: ${{ steps.vars.outputs.version }} + upload_url: ${{ steps.create_release.outputs.upload_url }} + + steps: + - name: Checkout... + uses: actions/checkout@v4 + + - name: Build and test... + run: mvn clean verify -U + + - name: Set version... + id: vars + run: | + RELEASE_TAG=${GITHUB_REF#refs/*/} + echo "tag=${RELEASE_TAG}" >> $GITHUB_OUTPUT + echo "version=${RELEASE_TAG}" >> $GITHUB_OUTPUT + + - name: Create release... + id: create_release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ steps.vars.outputs.tag }} + body: JJava ${{ steps.vars.outputs.version }} release + draft: true + prerelease: false + files: ./target/jjava-${{ steps.vars.outputs.version }}.zip + fail_on_unmatched_files: true diff --git a/.gitignore b/.gitignore index b2339c8..9a4baf5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ target/ .project .settings *.iml +release.properties +*.releaseBackup diff --git a/pom.xml b/pom.xml index c22faaf..a1860b0 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,4 @@ - + 4.0.0 org.dflib @@ -25,7 +23,7 @@ scm:git:https://github.com/dflib/jjava scm:git:ssh://git@github.com/dflib/jjava https://github.com/dflib/jjava - HEAD + ${project.version} @@ -133,6 +131,14 @@ + + org.apache.maven.plugins + maven-release-plugin + 3.0.1 + + @{project.version} + +