|
1 |
| -# This is a basic workflow that is manually triggered |
2 |
| - |
3 |
| -name: Manual workflow |
4 |
| - |
5 |
| -# Controls when the action will run. Workflow runs when manually triggered using the UI |
6 |
| -# or API. |
7 |
| -on: |
8 |
| - workflow_dispatch: |
9 |
| - # Inputs the workflow accepts. |
10 |
| - inputs: |
11 |
| - name: |
12 |
| - # Friendly description to be shown in the UI instead of 'name' |
13 |
| - description: 'It adds minor release indicator to version.' |
14 |
| - # Default value if no value is explicitly provided |
15 |
| - default: 'World' |
16 |
| - # Input has to be provided for the workflow to run |
17 |
| - required: true |
18 |
| - |
19 |
| -env: |
20 |
| - # Environment variable setting gradle options. |
21 |
| - GRADLE_OPTS: "-XX:MaxHeapSize=2048m -Dorg.gradle.jvmargs='-XX:MaxHeapSize=2048m -XX:MaxPermSize=512m -Dorg.gradle.daemon=false' -Dorg.gradle.daemon=false" |
22 |
| - |
23 |
| -# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
24 |
| -jobs: |
25 |
| - # This workflow contains a single job called "greet" |
26 |
| - public_rider_plugin: |
27 |
| - # The type of runner that the job will run on |
28 |
| - runs-on: ubuntu-20.04 |
29 |
| - container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0 |
30 |
| - |
31 |
| - # Steps represent a sequence of tasks that will be executed as part of the job |
32 |
| - steps: |
33 |
| - # Runs a single command using the runners shell |
34 |
| - - name: Print environment variables |
35 |
| - run: printenv |
36 |
| - |
37 |
| - - uses: actions/checkout@v3 |
38 |
| - |
39 |
| - - name: Set environment variables |
40 |
| - run: | |
41 |
| - # "You can make an environment variable available to any subsequent steps in a workflow job by |
42 |
| - # defining or updating the environment variable and writing this to the GITHUB_ENV environment file." |
43 |
| - echo "VERSION="$(date +%Y).$(date +%-m).${GITHUB_RUN_NUMBER}"" >> $GITHUB_ENV |
44 |
| - echo "POSTFIX=${{ github.event.inputs.version-postfix }}" >> $GITHUB_ENV |
45 |
| - |
46 |
| - - name: Set production version |
47 |
| - if: ${{ github.event.inputs.version-postfix == 'no-postfix-prod' || github.event.inputs.version-postfix == 'alpha' || github.event.inputs.version-postfix == 'beta' }} |
48 |
| - run: | |
49 |
| - echo "VERSION="$(date +%Y).$(date +%-m)"" >> $GITHUB_ENV |
50 |
| -
|
51 |
| - - name: Set version for minor release |
52 |
| - if: ${{ github.event.inputs.minor-release != 'none' }} |
53 |
| - run: | |
54 |
| - echo "VERSION=${{ env.VERSION }}.${{ github.event.inputs.minor-release }}" >> $GITHUB_ENV |
55 |
| -
|
56 |
| - - name: Create version with postfix |
57 |
| - if: ${{ (env.POSTFIX == 'alpha') || (env.POSTFIX == 'beta') }} |
58 |
| - run: |
59 |
| - echo "VERSION=${{ env.VERSION }}-${{ env.POSTFIX }}" >> $GITHUB_ENV |
60 |
| - |
61 |
| - - name: Build UTBot Rider plugin |
62 |
| - run: | |
63 |
| - gradle clean :utbot-rider:buildPlugin --no-daemon -PsemVer=${{ env.VERSION }} -PincludeRiderInBuild=true |
64 |
| - cd utbot-rider/build/distributions |
65 |
| - unzip utbot-rider-$PP env.VERSION }}.zip |
66 |
| - rm utbot-rider-${{ env.VERSION}}.zip |
67 |
| - |
68 |
| - - name: Archive UTBot Rider plugin |
69 |
| - uses: actions/upload-artifact@v3 |
70 |
| - with: |
71 |
| - name: utbot-rider-${{ env.VERSION }} |
72 |
| - path: utbot-rider/build/distributions/* |
73 |
| - |
| 1 | +# This is a basic workflow that is manually triggered |
| 2 | + |
| 3 | +name: Publish Rider plugin |
| 4 | + |
| 5 | +# Controls when the action will run. Workflow runs when manually triggered using the UI |
| 6 | +# or API. |
| 7 | +on: |
| 8 | + workflow_dispatch: |
| 9 | + # Inputs the workflow accepts. |
| 10 | + inputs: |
| 11 | + minor-release: |
| 12 | + type: choice |
| 13 | + description: "It adds minor release indicator to version." |
| 14 | + required: true |
| 15 | + default: 'none' |
| 16 | + options: |
| 17 | + - 'none' |
| 18 | + - '1' |
| 19 | + - '2' |
| 20 | + - '3' |
| 21 | + - '4' |
| 22 | + |
| 23 | + version-postfix: |
| 24 | + type: choice |
| 25 | + description: "It adds alpha or beta postfix to version." |
| 26 | + required: true |
| 27 | + default: no-postfix-prod |
| 28 | + options: |
| 29 | + - no-postfix-prod |
| 30 | + - no-postfix |
| 31 | + - alpha |
| 32 | + - beta |
| 33 | + |
| 34 | +env: |
| 35 | + # Environment variable setting gradle options. |
| 36 | + GRADLE_OPTS: "-XX:MaxHeapSize=2048m -Dorg.gradle.jvmargs='-XX:MaxHeapSize=2048m -XX:MaxPermSize=512m -Dorg.gradle.daemon=false' -Dorg.gradle.daemon=false" |
| 37 | + |
| 38 | +# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
| 39 | +jobs: |
| 40 | + # This workflow contains a single job called "greet" |
| 41 | + public_rider_plugin: |
| 42 | + # The type of runner that the job will run on |
| 43 | + runs-on: ubuntu-20.04 |
| 44 | + container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0 |
| 45 | + |
| 46 | + # Steps represent a sequence of tasks that will be executed as part of the job |
| 47 | + steps: |
| 48 | + # Runs a single command using the runners shell |
| 49 | + - name: Print environment variables |
| 50 | + run: printenv |
| 51 | + |
| 52 | + - uses: actions/checkout@v3 |
| 53 | + |
| 54 | + - name: Set environment variables |
| 55 | + run: | |
| 56 | + # "You can make an environment variable available to any subsequent steps in a workflow job by |
| 57 | + # defining or updating the environment variable and writing this to the GITHUB_ENV environment file." |
| 58 | + echo "VERSION="$(date +%Y).$(date +%-m).${GITHUB_RUN_NUMBER}"" >> $GITHUB_ENV |
| 59 | + echo "POSTFIX=${{ github.event.inputs.version-postfix }}" >> $GITHUB_ENV |
| 60 | + |
| 61 | + - name: Set production version |
| 62 | + if: ${{ github.event.inputs.version-postfix == 'no-postfix-prod' || github.event.inputs.version-postfix == 'alpha' || github.event.inputs.version-postfix == 'beta' }} |
| 63 | + run: | |
| 64 | + echo "VERSION="$(date +%Y).$(date +%-m)"" >> $GITHUB_ENV |
| 65 | +
|
| 66 | + - name: Set version for minor release |
| 67 | + if: ${{ github.event.inputs.minor-release != 'none' }} |
| 68 | + run: | |
| 69 | + echo "VERSION=${{ env.VERSION }}.${{ github.event.inputs.minor-release }}" >> $GITHUB_ENV |
| 70 | +
|
| 71 | + - name: Create version with postfix |
| 72 | + if: ${{ (env.POSTFIX == 'alpha') || (env.POSTFIX == 'beta') }} |
| 73 | + run: |
| 74 | + echo "VERSION=${{ env.VERSION }}-${{ env.POSTFIX }}" >> $GITHUB_ENV |
| 75 | + |
| 76 | + - name: Build UTBot Rider plugin |
| 77 | + run: | |
| 78 | + gradle clean :utbot-rider:buildPlugin --no-daemon -PsemVer=${{ env.VERSION }} -PincludeRiderInBuild=true |
| 79 | + cd utbot-rider/build/distributions |
| 80 | + unzip utbot-rider-$PP env.VERSION }}.zip |
| 81 | + rm utbot-rider-${{ env.VERSION}}.zip |
| 82 | + |
| 83 | + - name: Archive UTBot Rider plugin |
| 84 | + uses: actions/upload-artifact@v3 |
| 85 | + with: |
| 86 | + name: utbot-rider-${{ env.VERSION }} |
| 87 | + path: utbot-rider/build/distributions/* |
| 88 | + |
0 commit comments