forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (79 loc) · 2.92 KB
/
deploy-snapshots.yml
File metadata and controls
83 lines (79 loc) · 2.92 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
name: Quarkus Deploy Snapshots
permissions:
contents: read
issues: write
packages: write
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
env:
LANG: en_US.UTF-8
MVNW_REPOURL: https://maven-central.storage-download.googleapis.com/maven2
jobs:
build-and-deploy:
name: "Build and deploy"
runs-on: ubuntu-latest
if: github.repository == 'quarkusio/quarkus'
env:
MAVEN_OPTS: -Xmx6g -XX:MaxMetaspaceSize=2g -Dorg.slf4j.simpleLogger.log.eu.maveniverse=trace
steps:
- uses: actions/checkout@v6
with:
ref: main
- name: Get SHA
id: quarkus-sha
run: |
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Reclaim Disk Space
run: .github/ci-prerequisites.sh
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
- name: Generate cache key
id: cache-key
run: |
CURRENT_BRANCH="${{ github.repository != 'quarkusio/quarkus' && 'fork' || github.base_ref || github.ref_name }}"
CURRENT_MONTH=$(/bin/date -u "+%Y-%m")
CURRENT_DAY=$(/bin/date -u "+%d")
ROOT_CACHE_KEY="m2-cache"
echo "m2-monthly-cache-key=${ROOT_CACHE_KEY}-${CURRENT_MONTH}" >> $GITHUB_OUTPUT
echo "m2-monthly-branch-cache-key=${ROOT_CACHE_KEY}-${CURRENT_MONTH}-${CURRENT_BRANCH}" >> $GITHUB_OUTPUT
echo "m2-cache-key=${ROOT_CACHE_KEY}-${CURRENT_MONTH}-${CURRENT_BRANCH}-${CURRENT_DAY}" >> $GITHUB_OUTPUT
- name: Restore Maven Repository
uses: actions/cache/restore@v5
with:
path: ~/.m2/repository
key: ${{ steps.cache-key.outputs.m2-cache-key }}
restore-keys: |
${{ steps.cache-key.outputs.m2-monthly-branch-cache-key }}-
${{ steps.cache-key.outputs.m2-monthly-cache-key }}-
- name: Build and Deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./mvnw -e -B --no-transfer-progress --settings .github/release-settings.xml \
-Dnjord.autoPublish \
-DskipTests -DskipITs -Dno-format -Dinvoker.skip=true \
-Dno-test-modules \
-Ddeploy-gradle-plugins \
-Ddevelocity.cache.local.enabled=false \
-Ddevelocity.cache.remote.enabled=false \
-Ddokka \
-Prelocations,snapshots \
clean deploy
- name: Delete Local Artifacts From Cache
shell: bash
run: rm -r ~/.m2/repository/io/quarkus
- name: Report status
if: always()
uses: quarkusio/report-status-in-issue@main
with:
github-token: ${{ secrets.GITHUB_API_TOKEN }}
status: ${{ job.status }}
issue-repository: ${{ github.repository }}
issue-number: 12111
quarkus-sha: ${{ steps.quarkus-sha.outputs.sha }}
project-sha: ${{ steps.quarkus-sha.outputs.sha }}