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 11b1515
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 25 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/main.yml
@@ -0,0 +1,50 @@
name: "CI"

on:
push:
branches:
- master
pull_request:
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

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 11b1515

Please sign in to comment.