forked from eXist-db/exist
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.92 KB
/
Copy pathci-release-prepare.yml
File metadata and controls
63 lines (54 loc) · 1.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
name: Prepare Release
# Replaces mvn release:prepare. Updates CITATION.cff, commits, creates the
# annotated tag, and pushes — which then triggers ci-release.yml.
#
# Requires a fine-grained PAT (RELEASE_PAT) with contents:write on this repo.
# GITHUB_TOKEN pushes do not trigger downstream tag workflows.
on:
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g. 7.0.0)'
required: true
type: string
permissions:
contents: write
jobs:
prepare:
name: Prepare eXist-${{ inputs.version }}
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
# PAT required so the tag push triggers ci-release.yml.
# GITHUB_TOKEN pushes are intentionally blocked from triggering workflows.
token: ${{ secrets.RELEASE_PAT }}
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'
- uses: ./.github/actions/maven-cache
- uses: ./.github/actions/maven-github-settings
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update CITATION.cff
run: |
mvn -B --no-transfer-progress \
-Pcitation-release-metadata \
-DupdateCff=true \
-Drevision=${{ inputs.version }} \
validate
- name: Commit and tag
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add CITATION.cff
# Only commit if CITATION.cff actually changed
git diff --staged --quiet || \
git commit -m "[release] Prepare eXist-${{ inputs.version }}"
git tag -a "eXist-${{ inputs.version }}" \
-m "eXist-db ${{ inputs.version }}"
git push origin HEAD
git push origin "eXist-${{ inputs.version }}"