2023-02-28 01:15:26 +00:00
|
|
|
# AUTOGENERATED COPYRIGHT HEADER START
|
|
|
|
# Copyright (C) 2021-2023 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
|
|
|
# AUTOGENERATED COPYRIGHT HEADER END
|
|
|
|
|
2021-11-30 10:58:27 +00:00
|
|
|
name: Authors
|
2021-11-30 14:07:56 +00:00
|
|
|
on: workflow_dispatch
|
2021-04-19 17:29:55 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
update-authors:
|
2021-11-30 10:32:23 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2021-04-19 17:29:55 +00:00
|
|
|
name: "Update Authors"
|
|
|
|
steps:
|
|
|
|
- name: "Checkout"
|
2022-06-02 05:42:04 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-11-30 10:58:27 +00:00
|
|
|
- name: "Configure"
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
git config --global user.name 'GitHub Actions'
|
|
|
|
git config --global user.email 'xaymar@users.noreply.github.com'
|
|
|
|
git config pull.ff only
|
|
|
|
git config pull.rebase true
|
|
|
|
- name: "Remotes"
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
|
|
|
|
git fetch --all
|
2021-12-11 16:22:48 +00:00
|
|
|
- name: "Dependencies"
|
2021-11-30 10:32:23 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
sudo apt-get -qq update
|
|
|
|
sudo apt-get install nodejs npm
|
2021-04-19 17:29:55 +00:00
|
|
|
- name: "Generate Authors file"
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
CROWDIN_PROJECTID: "343435"
|
|
|
|
CROWDIN_TOKEN: ${{ secrets.AUTH_TOKEN_CROWDIN }}
|
|
|
|
GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN_GITHUB }}
|
|
|
|
run: |
|
|
|
|
git checkout -b authors
|
|
|
|
pushd ./tools > /dev/null
|
|
|
|
npm install
|
|
|
|
node ./generate-contributors.js "${{ github.workspace }}/AUTHORS.md" "${{ github.workspace }}/data/thanks.json"
|
2021-11-30 10:32:23 +00:00
|
|
|
popd > /dev/null
|
2021-04-19 17:29:55 +00:00
|
|
|
git add .
|
2021-11-30 10:58:27 +00:00
|
|
|
git commit -a -m "project: Update Contributors and Supporters"
|
|
|
|
git push -f --set-upstream origin authors
|