Skip to content

Check new release #2132

Check new release

Check new release #2132

name: Check new release
on:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
jobs:
check-new-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: denoland/setup-deno@v2
- name: Check update
run: |
echo current_version=`npm view deno-bin version` >> $GITHUB_ENV
echo latest_version=`deno -V | awk '{print $2}'` >> $GITHUB_ENV
- name: Show versions
run: |
echo latest_version=${{ env.latest_version }}
echo current_version=${{ env.current_version }}
- name: Bump
if: env.latest_version != env.current_version
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
npm version ${{ env.latest_version }}
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > .npmrc
npm publish
- name: Push changes back
if: env.latest_version != env.current_version
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}