@dytsou/resume-converter 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/update-year.yml +57 -0
- package/LICENSE +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Update Year in LICENSE and Footer
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
# Run on January 1st at 00:00 UTC each year
|
|
6
|
+
- cron: "0 0 1 1 *"
|
|
7
|
+
workflow_dispatch: # Allow manual trigger
|
|
8
|
+
push:
|
|
9
|
+
branches: [main]
|
|
10
|
+
paths:
|
|
11
|
+
- "LICENSE"
|
|
12
|
+
- "scripts/html-template.mjs"
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
update-year:
|
|
19
|
+
name: Update Year
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout repository
|
|
23
|
+
uses: actions/checkout@v6
|
|
24
|
+
with:
|
|
25
|
+
fetch-depth: 0
|
|
26
|
+
|
|
27
|
+
- name: Get current year
|
|
28
|
+
id: get_year
|
|
29
|
+
run: echo "year=$(date +%Y)" >> $GITHUB_OUTPUT
|
|
30
|
+
|
|
31
|
+
- name: Update LICENSE year
|
|
32
|
+
run: |
|
|
33
|
+
CURRENT_YEAR="${{ steps.get_year.outputs.year }}"
|
|
34
|
+
# Update the year in LICENSE file (format: Copyright (c) YYYY)
|
|
35
|
+
# Use sed to replace the 4-digit year while preserving the rest of the line
|
|
36
|
+
sed -i "s/Copyright (c) [0-9]\{4\}/Copyright (c) ${CURRENT_YEAR}/" LICENSE
|
|
37
|
+
echo "Updated LICENSE year to ${CURRENT_YEAR}"
|
|
38
|
+
|
|
39
|
+
- name: Check for changes
|
|
40
|
+
id: git_check
|
|
41
|
+
run: |
|
|
42
|
+
if git diff --quiet LICENSE; then
|
|
43
|
+
echo "changed=false" >> $GITHUB_OUTPUT
|
|
44
|
+
else
|
|
45
|
+
echo "changed=true" >> $GITHUB_OUTPUT
|
|
46
|
+
echo "Changes detected in LICENSE"
|
|
47
|
+
git diff LICENSE
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
- name: Commit and push changes
|
|
51
|
+
if: steps.git_check.outputs.changed == 'true'
|
|
52
|
+
run: |
|
|
53
|
+
git config --local user.email "action@github.com"
|
|
54
|
+
git config --local user.name "GitHub Action"
|
|
55
|
+
git add LICENSE
|
|
56
|
+
git commit -m "chore: update copyright year to ${{ steps.get_year.outputs.year }}"
|
|
57
|
+
git push
|
package/LICENSE
CHANGED