diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..a5cd3d0 --- /dev/null +++ b/.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 }} diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml deleted file mode 100644 index 7a1beb2..0000000 --- a/.github/workflows/semantic-release.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: "Lint & Release" - -on: - push: - branches: [ master ] - - workflow_dispatch: - -jobs: - build: - name: "install, lint, release" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 15 - - run: yarn install - - run: yarn lint:fix - - run: yarn build - - run: yarn semantic-release - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index bf15411..0a18ace 100644 --- a/package.json +++ b/package.json @@ -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": [