diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml new file mode 100644 index 00000000..a6bbcbc1 --- /dev/null +++ b/.github/workflows/gradle-publish.yml @@ -0,0 +1,49 @@ +# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle + +name: Gradle Package + +on: + push: + branches: + - main + # release: + # types: [created] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + pull-requests: write + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 8 + uses: actions/setup-java@v4 + with: + java-version: '8' + distribution: 'temurin' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 + + - name: Build with Gradle + run: ./gradlew :desktop:distTar + + - name: Release + id: release + uses: googleapis/release-please-action@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + release-type: simple + + - name: Upload Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: + gh release upload ${{ steps.release.outputs.tag_name }} desktop/build/distributions/desktop.tar diff --git a/build.gradle b/build.gradle index 1ee848c3..98118d70 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -project.description = 'GeoGebra' +project.description = 'GeoGeobra' apply from: 'gradle-scripts/dependencies.gradle' diff --git a/release-please.yml b/release-please.yml new file mode 100644 index 00000000..154ffc59 --- /dev/null +++ b/release-please.yml @@ -0,0 +1,24 @@ +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + with: + # this assumes that you have created a personal access token + # (PAT) and configured it as a GitHub action secret named + # `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important). + token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} + # this is a built-in strategy in release-please, see "Action Inputs" + # for more options + release-type: simple