Skip to content

Commit 9eb5c31

Browse files
authored
Merge pull request #1205 from PyThaiNLP/copilot/generate-citation-from-codemeta
Add GitHub Actions workflow to generate CITATION.cff from codemeta.json
2 parents 65a7788 + a50a0ce commit 9eb5c31

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/codemeta2cff.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# SPDX-FileCopyrightText: 2026 PyThaiNLP Project
2+
# SPDX-License-Identifier: Apache-2.0
3+
# SPDX-FileType: SOURCE
4+
5+
name: Generate CITATION.cff from codemeta.json
6+
run-name: Generate CITATION.cff after ${{github.event_name}} by ${{github.actor}}
7+
8+
on:
9+
push:
10+
paths:
11+
- 'codemeta.json'
12+
workflow_dispatch:
13+
inputs:
14+
reason:
15+
description: 'Reason for manual trigger'
16+
required: false
17+
default: 'Manual trigger'
18+
19+
jobs:
20+
generate-and-validate:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: write
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v6
27+
28+
- name: Generate CITATION.cff from codemeta.json
29+
uses: caltechlibrary/codemeta2cff@99ce10831c3037a067c3d9551d455638e0b438ac #v0.3.3
30+
31+
- name: Validate CITATION.cff
32+
uses: dieghernan/cff-validator@114aae53e1850c3757733beb60036941900e3dc3 #v4
33+
34+
- name: Commit and push updated CITATION.cff
35+
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 #v9.1.4
36+
with:
37+
message: 'Update CITATION.cff from codemeta.json'
38+
add: 'CITATION.cff'

0 commit comments

Comments
 (0)