-
Notifications
You must be signed in to change notification settings - Fork 25
64 lines (58 loc) · 1.76 KB
/
release.yaml
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
name: release
on:
pull_request:
paths:
- core/**
- .github/workflows/release.yaml
- gradle/**
- '*.gradle'
release:
types:
- created
env:
GROOVY_SSH_VERSION: ${{ github.event.release.tag_name }}
jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- uses: gradle/wrapper-validation-action@v3
- uses: gradle/gradle-build-action@v2
- run: ./gradlew sign
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
- if: github.event_name == 'release'
run: ./gradlew publish
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
cli:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- uses: gradle/wrapper-validation-action@v3
- uses: gradle/gradle-build-action@v2
- run: ./gradlew shadowJar
- run: java -jar cli/build/libs/gssh.jar
- run: sha256sum -b cli/build/libs/gssh.jar > cli/build/libs/gssh.jar.sha256
- if: github.event_name == 'release'
run: gh release upload '${{ github.event.release.tag_name }}' cli/build/libs/gssh.jar cli/build/libs/gssh.jar.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}