Skip to content

Commit 1340bde

Browse files
committed
Ensure version is up-to-date in references
1 parent 5f8628e commit 1340bde

2 files changed

Lines changed: 49 additions & 4 deletions

File tree

.github/workflows/create-release.yml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ on:
88
required: true
99
permissions:
1010
id-token: write # This is required for requesting the JWT
11-
contents: read # This is required for actions/checkout
11+
contents: write # This is required for actions/checkout
1212
attestations: write # required for provenance
1313
jobs:
1414
release:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout repository
1818
uses: actions/checkout@v5
19+
with:
20+
fetch-depth: 0
1921
- name: Set up JDK 21
2022
uses: actions/setup-java@v5
2123
with:
@@ -41,6 +43,40 @@ jobs:
4143
- name: Set version in Maven project
4244
run: mvn versions:set -DnewVersion=${{ github.event.inputs.versionTag }} -DprocessAllModules
4345

46+
- name: Update CITATION.cff (version + date)
47+
run: |
48+
VERSION="${{ github.event.inputs.versionTag }}"
49+
DATE="$(date -u +%Y-%m-%d)"
50+
51+
# top-level fields
52+
sed -i "s/^version: .*/version: \"${VERSION}\"/" CITATION.cff
53+
sed -i "s/^date-released: .*/date-released: \"${DATE}\"/" CITATION.cff
54+
55+
# preferred-citation fields (only if present)
56+
sed -i "s/^\(\s*version:\) .*/\1 \"${VERSION}\"/" CITATION.cff
57+
58+
echo "Updated CITATION.cff to version=${VERSION}, date-released=${DATE}"
59+
60+
- name: Commit release metadata (pom.xml + CITATION.cff)
61+
run: |
62+
git config user.name "github-actions[bot]"
63+
git config user.email "github-actions[bot]@users.noreply.github.com"
64+
65+
git add pom.xml */pom.xml CITATION.cff || true
66+
67+
if git diff --cached --quiet; then
68+
echo "No changes to commit."
69+
else
70+
git commit -m "Release ${{ github.event.inputs.versionTag }}"
71+
git push
72+
fi
73+
74+
- name: Create and push git tag
75+
run: |
76+
TAG="${{ github.event.inputs.versionTag }}"
77+
git tag -a "${TAG}" -m "Release ${TAG}"
78+
git push origin "${TAG}"
79+
4480
- name: Build with Maven
4581
run: mvn -B package -Prelease --file pom.xml
4682

CITATION.CFF

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
cff-version: 1.2.0
22

3-
title: "Compass — Java library for FAIR Signposting validation of RFC 8288 Web Links (alpha)"
3+
title: "Compass: FAIR Signposting validation for RFC 8288 Web Links (Java, alpha)"
4+
5+
abstract: >-
6+
Compass is a Java library for validating and interpreting FAIR Signposting
7+
based on RFC 8288 Web Links. It provides defensive Web Link model validation,
8+
validation of FAIR Signposting Level 1 and Level 2 recipes, semantic accessors
9+
for Signposting relations, and parsing support for RFC 9264 Link Sets.
10+
Compass operates entirely in memory, performs no network requests, and is
11+
designed to integrate with existing HTTP and metadata processing pipelines.
412

513
message: >-
614
This software is in an early (alpha) stage and under active development.
715
APIs and behavior may change without notice.
816
You may cite this version to describe the software used in your work.
9-
For long-term or archival references, consider citing a later stable release when available.
17+
For long-term or archival references, consider citing a later stable release
18+
when available.
1019

1120
version: "1.0.0-alpha.2"
1221
date-released: "2026-01-20"
@@ -23,7 +32,7 @@ license: "AGPL-3.0-only"
2332

2433
preferred-citation:
2534
type: software
26-
title: "Compass — Java library for FAIR Signposting validation of RFC 8288 Web Links"
35+
title: "Compass: FAIR Signposting validation for RFC 8288 Web Links"
2736
version: "1.0.0-alpha.2"
2837
authors:
2938
- family-names: Fillinger

0 commit comments

Comments
 (0)