Skip to content

Commit ec75786

Browse files
committed
ci: add CI and Deploy workflows
1 parent 829698f commit ec75786

2 files changed

Lines changed: 71 additions & 0 deletions

File tree

.github/workflows/CI.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
Build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: jlumbroso/free-disk-space@main
10+
with:
11+
tool-cache: false
12+
large-packages: false
13+
dotnet: false
14+
- uses: actions/checkout@v4
15+
with:
16+
submodules: recursive
17+
- uses: actions/cache@v4
18+
with:
19+
path: |
20+
build/gradle-jvm
21+
~/.nuget/packages
22+
~/.gradle/caches
23+
~/.gradle/wrapper
24+
key: ${{ runner.os }}-Build-${{ hashFiles('gradlew.bat', 'src/dotnet/*/*.csproj', 'src/dotnet/*.props', 'gradle-wrapper.properties') }}
25+
- run: ./gradlew :buildPlugin --no-daemon
26+
- uses: actions/upload-artifact@v4
27+
if: always()
28+
with:
29+
name: ${{ github.event.repository.name }}.CI.${{ github.ref_name }}.${{ github.run_number }}
30+
path: output
31+
Test:
32+
runs-on: windows-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
with:
36+
submodules: recursive
37+
- uses: actions/cache@v4
38+
with:
39+
path: |
40+
build/gradle-jvm
41+
packages
42+
~/.nuget/packages
43+
~/.gradle/caches
44+
~/.gradle/wrapper
45+
key: ${{ runner.os }}-Test-${{ hashFiles('gradlew.bat', 'src/dotnet/*/*.csproj', 'src/dotnet/*.props', 'gradle-wrapper.properties') }}
46+
- run: ./gradlew.bat :testDotNet --no-daemon

.github/workflows/Deploy.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- '*.*.*'
7+
8+
jobs:
9+
Publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: jlumbroso/free-disk-space@main
13+
with:
14+
tool-cache: false
15+
large-packages: false
16+
dotnet: false
17+
- uses: actions/checkout@v4
18+
with:
19+
submodules: recursive
20+
- run: ./gradlew :publishPlugin -PBuildConfiguration="Release" -PPluginVersion="${{ github.ref_name }}" -PPublishToken="${{ env.PUBLISH_TOKEN }}"
21+
- uses: actions/upload-artifact@v4
22+
if: always()
23+
with:
24+
name: ${{ github.event.repository.name }}.${{ github.ref_name }}
25+
path: output

0 commit comments

Comments
 (0)