forked from koiverse/ArchiveTune
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (22 loc) · 872 Bytes
/
header.yml
File metadata and controls
30 lines (22 loc) · 872 Bytes
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
name: Kotlin Header
on: workflow_dispatch
jobs:
kotlin-header:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: '1.26'
- run: go install github.com/google/addlicense@latest
- run: |
YEAR=$(date +%Y)
echo -e "ArchiveTune Project Original ($YEAR)\nKòi Natsuko (github.com/koiverse)\nLicensed Under GPL-3.0 | see git history for contributors" > banner.txt
find . -type f -name "*.kt" -exec grep -q "Licensed Under GPL-3.0" {} \; -exec sed -i '0,/\*\//d' {} \;
find . -type f -name "*.kt" -print0 | xargs -0 -r addlicense -v -f banner.txt
rm banner.txt
- uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: Kotlin Header