diff --git a/.github/workflows/lint-and-build.yml b/.github/workflows/lint-and-build.yml new file mode 100644 index 0000000..99f6c4e --- /dev/null +++ b/.github/workflows/lint-and-build.yml @@ -0,0 +1,33 @@ +name: Test and Build + +on: + push: + branches: + # Only run on branch push, not tag push + - '**' + pull_request: + +jobs: + lint: + # Run for external PRs, but not on our own internal PRs as they'll be run by the push to the branch. + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'DoctorMcKay/node-steam-appticket' + + uses: DoctorMcKay/github-workflows/.github/workflows/eslint.yml@master + with: + node-version: 12.x + + build: + # Run for external PRs, but not on our own internal PRs as they'll be run by the push to the branch. + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'DoctorMcKay/node-steam-appticket' + + uses: DoctorMcKay/github-workflows/.github/workflows/npm-pack.yml@master + with: + node-version: 12.x + package-name: steam-appticket + + publish: + needs: [ lint, build ] + if: success() && github.event.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '#npm-publish') + uses: DoctorMcKay/github-workflows/.github/workflows/npm-publish.yml@master + secrets: + npm-access-token: ${{ secrets.NPM_ACCESS_TOKEN }}