.github/workflows/update.yml #714
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
on: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 12 * * * | |
push: | |
branches: | |
- main | |
paths: | |
- generating.config.json | |
concurrency: | |
group: update-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
uses: ./.github/workflows/tests.yml | |
update: | |
# for npm publish --provenance | |
permissions: | |
id-token: write | |
contents: write | |
needs: [ tests ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
# Publish new versions | |
- run: deno task generate | |
- run: deno task publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# Update list in README.md | |
- run: deno task list | |
- run: | | |
git diff --exit-code README.md || ( | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add README.md | |
git commit -m 'docs: Update packages in readme' | |
git push | |
) | |
- run: | | |
git diff --exit-code deno.lock || ( | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add deno.lock | |
git commit -m 'deps: update deno.lock' | |
git push | |
) |