From 0b4a11acbec370c68a0339a99a4b04c4cc559399 Mon Sep 17 00:00:00 2001 From: Kononov Artemii Date: Tue, 6 Dec 2022 15:14:19 +0300 Subject: [PATCH] Rider plugin workflow only yml file --- .github/workflows/public-rider-plugin.yml | 73 +++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/public-rider-plugin.yml diff --git a/.github/workflows/public-rider-plugin.yml b/.github/workflows/public-rider-plugin.yml new file mode 100644 index 0000000000..02657aab2c --- /dev/null +++ b/.github/workflows/public-rider-plugin.yml @@ -0,0 +1,73 @@ +# 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/* +