-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (92 loc) · 3.05 KB
/
main.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Rider plugin
env:
IDE_TOOLS_RELEASE_VERSION: 1.0.0
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
jobs:
main:
runs-on: ${{ matrix.image }}
strategy:
matrix:
image: [macos-13, ubuntu-22.04, windows-2022]
fail-fast: false
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
steps:
- name: Checkout current repo
uses: actions/checkout@v4
with:
path: main
- if: ${{ github.ref == 'refs/heads/main' }}
name: Checkout Meadow.CLI.Core side-by-side
uses: actions/checkout@v4
with:
repository: WildernessLabs/Meadow.CLI
path: Meadow.CLI
ref: main
- if: ${{ github.ref != 'refs/heads/main' }}
name: Checkout Meadow.CLI.Core side-by-side
uses: actions/checkout@v4
with:
repository: WildernessLabs/Meadow.CLI
path: Meadow.CLI
ref: develop
- name: Checkout Meadow.Contracts side-by-side
uses: actions/checkout@v4
with:
repository: WildernessLabs/Meadow.Contracts
path: Meadow.Contracts
ref: main
- if: matrix.image == 'ubuntu-22.04'
name: Free disk space
uses: jlumbroso/[email protected]
with:
tool-cache: false
large-packages: false
# Common preparation
- name: Prepare build
run: ./gradlew prepare
working-directory: ./main
# Backend
- name: Set up .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Build Backend
run: dotnet build -c Release
working-directory: ./main
# Distribution
- name: Build Distribution
run: ./gradlew -PbuildConfiguration=Release -PbuildNumber=${{ github.run_number }} buildPlugin
working-directory: ./main
- name: Unpack distribution # for the purpose of uploading. Only on Linux to avoid zip name clash
if: matrix.image == 'ubuntu-22.04'
shell: pwsh
run: main/scripts/Unpack-Distribution.ps1
- name: Upload the artifact
if: matrix.image == 'ubuntu-22.04' # Only on Linux to avoid zip name clash
uses: actions/upload-artifact@v4
with:
name: rider-meadow-plugin-${{ ENV.IDE_TOOLS_RELEASE_VERSION }}
path: main/build/distributions/unpacked
# Publish
- if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' }}
name: Publish
shell: pwsh
run: main/scripts/Publish-Distribution.ps1 -Channel dev -AuthToken $env:JETBRAINS_MARKETPLACE_TOKEN
env:
JETBRAINS_MARKETPLACE_TOKEN: ${{ secrets.JETBRAINS_MARKETPLACE_TOKEN }}
validation:
runs-on: ubuntu-22.04
name: "Validate Gradle wrapper"
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3