From 58b743cac40251102cd186f99ade09b1d8c11088 Mon Sep 17 00:00:00 2001 From: Mikhail Dzianishchyts Date: Fri, 17 May 2024 21:20:56 +0300 Subject: [PATCH 1/2] Set up test workflow --- .github/workflows/maven.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/maven.yml 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 From a3c24253749e5f25b58d4a1fb038404b3b09aba5 Mon Sep 17 00:00:00 2001 From: Mikhail Dzianishchyts Date: Sat, 18 May 2024 11:44:11 +0300 Subject: [PATCH 2/2] Set up release workflow --- .github/workflows/release.yml | 40 +++++++++++++++++++++++++++++++++++ .gitignore | 2 ++ pom.xml | 14 ++++++++---- 3 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release.yml 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} + +