From 73900a4519bbe02f8f6f071c0f8a1594cf71a50b Mon Sep 17 00:00:00 2001 From: Denis Fokin Date: Thu, 19 Oct 2023 17:31:15 +0300 Subject: [PATCH] Packages publication --- .github/workflows/publish-packages.yml | 46 ++++++++++++++++++++++++++ build.gradle.kts | 1 - 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish-packages.yml diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml new file mode 100644 index 00000000..ee898ba6 --- /dev/null +++ b/.github/workflows/publish-packages.yml @@ -0,0 +1,46 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# 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: + workflow_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'corretto' + 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: Build with Gradle + uses: gradle/gradle-build-action@v2 + with: + gradle-version: 7.4.2 + arguments: :utbot-light:build -x test + + # The USERNAME and TOKEN need to correspond to the credentials environment variables used in + # the publishing section of your build.gradle + - name: Publish to GitHub Packages + uses: gradle/gradle-build-action@v2 + with: + gradle-version: 7.4.2 + arguments: publish + env: + GITHUB_ACTOR: ${{ github.actor }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.gradle.kts b/build.gradle.kts index df9bb52c..41d94e06 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,4 @@ import java.text.SimpleDateFormat -import org.gradle.api.JavaVersion.* import org.jetbrains.kotlin.gradle.tasks.KotlinCompile group = "org.utbot"