-
Notifications
You must be signed in to change notification settings - Fork 36
90 lines (77 loc) · 2.49 KB
/
Copy pathbuild.yml
File metadata and controls
90 lines (77 loc) · 2.49 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
name: build
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
# Run weekly on Sunday to keep the Maven cache alive.
- cron: '4 5 * * 0'
jobs:
build:
runs-on: ubuntu-latest
permissions:
actions: write # needed to delete and re-save the pombast cache
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '11'
java-package: 'jdk+fx'
distribution: 'zulu'
cache: 'maven'
- uses: astral-sh/setup-uv@v6
- uses: webfactory/ssh-agent@v0.9.0
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up build environment
run: .github/setup-build.sh
shell: bash
- name: Maven CI build
run: .github/build.sh
shell: bash
env:
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
CENTRAL_USER: ${{ secrets.CENTRAL_USER }}
CENTRAL_PASS: ${{ secrets.CENTRAL_PASS }}
SIGNING_ASC: ${{ secrets.SIGNING_ASC }}
- name: Restore pombast cache
uses: actions/cache/restore@v4
with:
# pombast: success/timestamp caches; cjdk: downloaded JDKs + Maven;
# jgo: per-artifact bytecode-scan results. (~/.m2 is cached above by
# setup-java's cache: 'maven'.)
path: |
~/.cache/pombast
~/.cache/cjdk
~/.cache/jgo
key: ${{ runner.os }}-pombast-build
- name: Run pombast melt+smelt commands
run: .github/melt.sh
shell: bash
- name: Delete old pombast cache
if: always()
run: .github/delete-cache.sh "${{ runner.os }}-pombast-build"
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Save pombast cache
if: always()
uses: actions/cache/save@v4
with:
path: |
~/.cache/pombast
~/.cache/cjdk
~/.cache/jgo
key: ${{ runner.os }}-pombast-build
- name: Publish smelt results
if: always() && github.ref == 'refs/heads/master' && github.event_name == 'push'
run: .github/publish.sh "Update smelt results" smelt.json
shell: bash