diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..5963eab3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +name: release + +on: + push: + tags: + - "v*.*.*" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'corretto' + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + urban-spork-client-gui/target/*.zip + urban-spork-server/target/*.zip + + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}