Skip to content

Commit

Permalink
feat(run changelog on main push): run changelog on main push
Browse files Browse the repository at this point in the history
  • Loading branch information
imbhargav5 committed Apr 21, 2021
1 parent dd752ab commit 97deade
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Node CI

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Check if user has write access'
uses: 'lannonbr/repo-permission-check-action@2.0.0'
with:
permission: 'write'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@master
ref: main
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
version: 12.x
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install project dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true' # Over here!
run: yarn
- name: test
run: yarn test
- name: generate changelog
run: yarn generate:changelog
- name: Commit changelog
continue-on-error: true
run: |
git add .
git -c user.name="imbhargav5" -c user.email="imbhargav5@users.noreply.github.com" \
commit -m "Update changelog [skip ci]" --no-verify --quiet
git push "https://imbhargav5:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" main

0 comments on commit 97deade

Please sign in to comment.