Skip to content

Commit

Permalink
chore: improve GH action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xobotyi committed Mar 11, 2021
1 parent a915797 commit c1d51bb
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 25 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/main.yml
@@ -0,0 +1,61 @@
name: "CI"

on:
push:
branches:
- master
pull_request_target:
types: [ assigned, opened, synchronize, reopened ]
branches:
- master
workflow_dispatch:

jobs:
test:
name: "Lint & Test & Build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 15

- name: "Install dependencies"
uses: bahmutov/npm-install@v1
with:
useRollingCache: true
- name: "Lint"
run: yarn lint
- name: "Build"
run: yarn build

automerge:
name: "Dependabot automerge"
needs: test
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target' }}
steps:
- uses: fastify/github-action-merge-dependabot@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

release:
name: "semantic-release"
needs: test
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 15

- name: "Install dependencies"
uses: bahmutov/npm-install@v1
with:
useRollingCache: true
- name: "semantic-release"
run: yarn semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 0 additions & 24 deletions .github/workflows/semantic-release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -25,7 +25,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/xobotyi/eslint-config.git"
"url": "https://github.com/xobotyi/node-beanstalk.git"
},
"release": {
"branches": [
Expand Down

0 comments on commit c1d51bb

Please sign in to comment.