diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e7ad00a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: release-project + +on: push + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + if: startsWith(github.ref, 'refs/tags/') + + - name: Set up JDK 1.12 + uses: actions/setup-java@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + java-version: 1.12 + + + - name: Build with Maven + run: mvn -B package --file pom.xml -Djar.finalName=serena + if: startsWith(github.ref, 'refs/tags/') + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: target/serena.jar + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}