-
Notifications
You must be signed in to change notification settings - Fork 43
84 lines (71 loc) · 3.17 KB
/
public-rider-plugin.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# 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
# 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:java17-zulu-jdk-gradle7.6.1-kotlinc1.8.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 --build-cache --no-parallel -PgithubActor=${{ github.actor }} -PgithubToken=${{ secrets.PACKAGES_RO_TOKEN }} -Dorg.gradle.jvmargs=-Xmx2g -Dkotlin.daemon.jvm.options=-Xmx4g -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/*