-
Notifications
You must be signed in to change notification settings - Fork 6
33 lines (33 loc) · 1.17 KB
/
check-new-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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@v1
- 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 }}