Update package from Github #1412
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 package from Github | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '5 4 * * *' | |
| permissions: | |
| # Required for add-and-commit | |
| contents: write | |
| jobs: | |
| streamlink-update: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/jod | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Update package | |
| run: yarn ts-node scripts/release.ts --upload | |
| env: | |
| CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Commit changes back to the repository | |
| shell: bash | |
| run: | | |
| if [[ -z "$(git status --porcelain)" ]]; then | |
| echo No changes to be committed. Exiting... | |
| exit 0 | |
| fi | |
| git config --local user.name "streamlinkbot" | |
| git config --local user.email "streamlinkbot@users.noreply.github.com" | |
| git add . | |
| git commit -m "Automatic version update" | |
| git push |