-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 1.65 KB
/
release.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
---
name: Release CI
on:
workflow_call:
push:
branches:
- main
tags-ignore:
- "*"
paths:
- gradle/libs.dependencies.toml
jobs:
release:
permissions:
contents: write
name: Release CLI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
git fetch --all
git reset --hard origin/main
- name: Set variables
id: setvars
run: |
version=$(sed -n 's,palantir-version = "\(.*\)",\1,p' gradle/libs.dependencies.toml)
echo "palantir_version=$version" >> $GITHUB_OUTPUT
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21
cache: gradle
- name: Build palantir cli ${{ github.event.inputs.palantir_version }}
run: |
./gradlew build -S --warning-mode all --no-daemon
env:
PALANTIR_VERSION: ${{ steps.setvars.outputs.palantir_version }}
- name: Test palantir cli ${{ github.event.inputs.palantir_version }}
run: |
java -jar build/libs/palantir-cli-*-standalone.jar
env:
PALANTIR_VERSION: ${{ steps.setvars.outputs.palantir_version }}
- name: Release palantir cli ${{steps.setvars.outputs.palantir_version}}"
run: |
gh release create \
"$PALANTIR_VERSION" \
-t "Palantir CLI $PALANTIR_VERSION" \
--generate-notes \
"build/libs/palantir-cli-${PALANTIR_VERSION}-standalone.jar"
env:
PALANTIR_VERSION: ${{ steps.setvars.outputs.palantir_version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}