update library refs #9
This file contains hidden or 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 Library References | |
| run-name: update library refs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - 'f95/auto-open-filter-drawer.user.js' | |
| - 'lc/game-post-only.user.js' | |
| jobs: | |
| update-hash: | |
| name: Update hash | |
| permissions: | |
| contents: write | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Configurations | |
| run: | | |
| git config --global user.name ${{ secrets.USER_NAME }} | |
| git config --global user.email ${{ secrets.EMAIL }} | |
| - name: Update references with new hash | |
| shell: pwsh | |
| run: | | |
| $CommitHash = (git rev-parse HEAD) | |
| Get-Item "./f95/*", "./lc/*" | ForEach-Object -Process {(Get-Content $_) -replace '[a-f0-9]{40}', $CommitHash | Set-Content $_} | |
| git add -A | |
| git commit -m "Fix library references" | |
| git push --force origin main |