Version 4.0.1 #225
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Version | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Get changed files | |
id: files | |
run: | | |
diff=$(git diff --name-only --diff-filter=AM HEAD^..HEAD | tr '\n' ',') | |
echo "added_modified=$diff" >> "$GITHUB_OUTPUT" | |
echo "Added & Modified: $diff" | |
diff=$(git diff --name-only --diff-filter=D HEAD^..HEAD | tr '\n' ',') | |
echo "removed=$diff" >> "$GITHUB_OUTPUT" | |
echo "Removed: $diff" | |
- name: Update to new Version | |
id: update | |
working-directory: .github/workflows/scripts | |
run: | | |
output=$(python update_version.py -files ${{ steps.files.outputs.added_modified }} -removed ${{ steps.files.outputs.removed }}) | |
output="${output//'%'/'%25'}" | |
output="${output//$'\n'/'%0A'}" | |
output="${output//$'\r'/'%0D'}" | |
echo "log=$output" >> $GITHUB_OUTPUT | |
- name: Print Log | |
run: echo "${{ steps.update.outputs.log }}" | |
- name: Update files on GitHub | |
uses: test-room-7/[email protected] | |
with: | |
file-path: | | |
ActRec/__init__.py | |
download_file.json | |
ActRec/actrec/config.py | |
commit-msg: Update Files | |
github-token: ${{ secrets.FILE_UPDATER }} |