Skip to content

.github/workflows/update.yml #478

.github/workflows/update.yml

.github/workflows/update.yml #478

Workflow file for this run

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 github-actions@github.com
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 github-actions@github.com
git add deno.lock
git commit -m 'deps: update deno.lock'
git push
)