forked from controlsfx/controlsfx
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (52 loc) · 1.67 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
57
58
59
60
name: ControlsFX Release
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Import GPG keys
run: |
gpg --import --batch <(echo "$GPG_PRIVATE_KEY") &> /dev/null
# Gradle doesn't support GPG 2.1 and later: https://github.com/gradle/gradle/issues/888
gpg --export-secret-keys --pinentry-mode loopback --passphrase="$GPG_PASSPHRASE" > ~/.gnupg/secring.gpg
rm -rf /tmp/secret
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Run Tests (Linux)
if: runner.os == 'Linux'
run: |
export DISPLAY=:90
Xvfb -ac :90 -screen 0 1280x1024x24 > /dev/null 2>&1 &
./gradlew build test
- name: Release to GithubPackages
id: deploy
run: |
./gradlew publishAllPublicationsToGitHubPackagesRepository
echo ::set-output name=exit_code::$?
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update Javadocs
if: steps.deploy.outputs.exit_code == 0
run: |
TAG=${GITHUB_REF/refs\/tags\//}
bash .github/scripts/update-javadoc.sh "$TAG"
env:
PAT: ${{ secrets.PAT }}