Skip to content

Commit d7800c4

Browse files
authored
Rider plugin workflow (#1462)
only yml file
1 parent 751663e commit d7800c4

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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+

0 commit comments

Comments
 (0)