diff --git a/.github/workflows/public-rider-plugin.yml b/.github/workflows/public-rider-plugin.yml index 02657aab2c..fe78d8c3da 100644 --- a/.github/workflows/public-rider-plugin.yml +++ b/.github/workflows/public-rider-plugin.yml @@ -1,73 +1,88 @@ -# This is a basic workflow that is manually triggered - -name: Manual workflow - -# Controls when the action will run. Workflow runs when manually triggered using the UI -# or API. -on: - workflow_dispatch: - # Inputs the workflow accepts. - inputs: - name: - # Friendly description to be shown in the UI instead of 'name' - description: 'It adds minor release indicator to version.' - # Default value if no value is explicitly provided - default: 'World' - # Input has to be provided for the workflow to run - required: true - -env: - # Environment variable setting gradle options. - GRADLE_OPTS: "-XX:MaxHeapSize=2048m -Dorg.gradle.jvmargs='-XX:MaxHeapSize=2048m -XX:MaxPermSize=512m -Dorg.gradle.daemon=false' -Dorg.gradle.daemon=false" - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "greet" - public_rider_plugin: - # The type of runner that the job will run on - runs-on: ubuntu-20.04 - container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0 - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Runs a single command using the runners shell - - name: Print environment variables - run: printenv - - - uses: actions/checkout@v3 - - - name: Set environment variables - run: | - # "You can make an environment variable available to any subsequent steps in a workflow job by - # defining or updating the environment variable and writing this to the GITHUB_ENV environment file." - echo "VERSION="$(date +%Y).$(date +%-m).${GITHUB_RUN_NUMBER}"" >> $GITHUB_ENV - echo "POSTFIX=${{ github.event.inputs.version-postfix }}" >> $GITHUB_ENV - - - name: Set production version - if: ${{ github.event.inputs.version-postfix == 'no-postfix-prod' || github.event.inputs.version-postfix == 'alpha' || github.event.inputs.version-postfix == 'beta' }} - run: | - echo "VERSION="$(date +%Y).$(date +%-m)"" >> $GITHUB_ENV - - - name: Set version for minor release - if: ${{ github.event.inputs.minor-release != 'none' }} - run: | - echo "VERSION=${{ env.VERSION }}.${{ github.event.inputs.minor-release }}" >> $GITHUB_ENV - - - name: Create version with postfix - if: ${{ (env.POSTFIX == 'alpha') || (env.POSTFIX == 'beta') }} - run: - echo "VERSION=${{ env.VERSION }}-${{ env.POSTFIX }}" >> $GITHUB_ENV - - - name: Build UTBot Rider plugin - run: | - gradle clean :utbot-rider:buildPlugin --no-daemon -PsemVer=${{ env.VERSION }} -PincludeRiderInBuild=true - cd utbot-rider/build/distributions - unzip utbot-rider-$PP env.VERSION }}.zip - rm utbot-rider-${{ env.VERSION}}.zip - - - name: Archive UTBot Rider plugin - uses: actions/upload-artifact@v3 - with: - name: utbot-rider-${{ env.VERSION }} - path: utbot-rider/build/distributions/* - +# This is a basic workflow that is manually triggered + +name: Publish Rider plugin + +# Controls when the action will run. Workflow runs when manually triggered using the UI +# or API. +on: + workflow_dispatch: + # Inputs the workflow accepts. + inputs: + minor-release: + type: choice + description: "It adds minor release indicator to version." + required: true + default: 'none' + options: + - 'none' + - '1' + - '2' + - '3' + - '4' + + version-postfix: + type: choice + description: "It adds alpha or beta postfix to version." + required: true + default: no-postfix-prod + options: + - no-postfix-prod + - no-postfix + - alpha + - beta + +env: + # Environment variable setting gradle options. + GRADLE_OPTS: "-XX:MaxHeapSize=2048m -Dorg.gradle.jvmargs='-XX:MaxHeapSize=2048m -XX:MaxPermSize=512m -Dorg.gradle.daemon=false' -Dorg.gradle.daemon=false" + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "greet" + public_rider_plugin: + # The type of runner that the job will run on + runs-on: ubuntu-20.04 + container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0 + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Runs a single command using the runners shell + - name: Print environment variables + run: printenv + + - uses: actions/checkout@v3 + + - name: Set environment variables + run: | + # "You can make an environment variable available to any subsequent steps in a workflow job by + # defining or updating the environment variable and writing this to the GITHUB_ENV environment file." + echo "VERSION="$(date +%Y).$(date +%-m).${GITHUB_RUN_NUMBER}"" >> $GITHUB_ENV + echo "POSTFIX=${{ github.event.inputs.version-postfix }}" >> $GITHUB_ENV + + - name: Set production version + if: ${{ github.event.inputs.version-postfix == 'no-postfix-prod' || github.event.inputs.version-postfix == 'alpha' || github.event.inputs.version-postfix == 'beta' }} + run: | + echo "VERSION="$(date +%Y).$(date +%-m)"" >> $GITHUB_ENV + + - name: Set version for minor release + if: ${{ github.event.inputs.minor-release != 'none' }} + run: | + echo "VERSION=${{ env.VERSION }}.${{ github.event.inputs.minor-release }}" >> $GITHUB_ENV + + - name: Create version with postfix + if: ${{ (env.POSTFIX == 'alpha') || (env.POSTFIX == 'beta') }} + run: + echo "VERSION=${{ env.VERSION }}-${{ env.POSTFIX }}" >> $GITHUB_ENV + + - name: Build UTBot Rider plugin + run: | + gradle clean :utbot-rider:buildPlugin --no-daemon -PsemVer=${{ env.VERSION }} -PincludeRiderInBuild=true + cd utbot-rider/build/distributions + unzip utbot-rider-${{ env.VERSION }}.zip + rm utbot-rider-${{ env.VERSION }}.zip + + - name: Archive UTBot Rider plugin + uses: actions/upload-artifact@v3 + with: + name: utbot-rider-${{ env.VERSION }} + path: utbot-rider/build/distributions/* + diff --git a/.gitignore b/.gitignore index 47b6b875b5..fb4b7627bf 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ target/ .gradle/ *.log *.rdgen +utbot-intellij/src/main/resources/settings.properties \ No newline at end of file diff --git a/.run/Run IDE.run.xml b/.run/Run IDEA.run.xml similarity index 89% rename from .run/Run IDE.run.xml rename to .run/Run IDEA.run.xml index 10d313f7d7..7e74aac718 100644 --- a/.run/Run IDE.run.xml +++ b/.run/Run IDEA.run.xml @@ -1,5 +1,5 @@ - +