forked from apple/pkl-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (114 loc) · 3.22 KB
/
build.yml
File metadata and controls
115 lines (114 loc) · 3.22 KB
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
109
110
111
112
113
114
115
# Do not modify!
# This file was generated from a template using https://github.com/StefMa/pkl-gha
name: Build
'on':
push:
branches-ignore:
- main
- release/*
tags-ignore:
- '**'
permissions:
contents: read
jobs:
build:
permissions:
checks: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-java@v5
with:
java-version: '21'
distribution: temurin
cache: gradle
- run: ./gradlew --info --stacktrace -DtestReportsDir="${HOME}/test-results" check shadowJar verifyDistribution
- name: Upload build artifacts
if: '!cancelled()'
uses: actions/upload-artifact@v5
with:
name: pkl-lsp-build-artifacts
path: build/libs/
- name: Publish test results
if: '!cancelled()'
uses: EnricoMi/publish-unit-test-result-action@v2
with:
comment_mode: 'off'
files: ~/test-results/**/*.xml
test-macos:
if: github.repository_owner == 'apple'
needs:
- build
permissions:
checks: write
runs-on:
- self-hosted
- macos
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: '21'
distribution: temurin
cache: gradle
- uses: actions/download-artifact@v6
with:
name: pkl-lsp-build-artifacts
path: build/libs/
- run: ./gradlew --info --stacktrace -DtestReportsDir="${HOME}/test-results" verifyDistribution
- name: Publish test results
if: '!cancelled()'
uses: EnricoMi/publish-unit-test-result-action@v2
with:
comment_mode: 'off'
files: ~/test-results/**/*.xml
test-windows:
needs:
- build
permissions:
checks: write
runs-on: windows-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: '21'
distribution: temurin
cache: gradle
- uses: actions/download-artifact@v6
with:
name: pkl-lsp-build-artifacts
path: build/libs/
- run: ./gradlew --info --stacktrace -DtestReportsDir="${HOME}/test-results" verifyDistribution
- name: Publish test results
if: '!cancelled()'
uses: EnricoMi/publish-unit-test-result-action@v2
with:
comment_mode: 'off'
files: ~/test-results/**/*.xml
deploy-maven-snapshot:
needs:
- test-macos
- test-windows
runs-on: ubuntu-latest
environment: pkl-maven-deploy
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
java-version: '21'
distribution: temurin
cache: gradle
- uses: actions/download-artifact@v6
with:
name: pkl-lsp-build-artifacts
path: build/libs/
- name: Publish snapshot release
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_signingKey }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingPassword }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_sonatypePassword }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.ORG_GRADLE_PROJECT_sonatypeUsername }}
run: ./gradlew publishToSonatype