diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b4dd39b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Release artifact with Maven + +on: + push: + tags: + - "[0-9]+.[0-9]+.[0-9]+" + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 19 + uses: actions/setup-java@v3 + with: + java-version: "19" + distribution: "temurin" + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Run unit tests + run: mvn test + + - name: Upload artifact to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: target/quboscanner*.jar + file_glob: true + tag: ${{ github.ref }} + overwrite: true