Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split bump npm version into its own job #98

Merged
merged 2 commits into from
Feb 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ jobs:
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)

publish-npm:
if: github.ref == 'refs/heads/master' && github.actor == 'vikelabs-bot'
bump-npm-version:
if: github.ref == 'refs/heads/master' && github.actor != 'vikelabs-bot'
needs: [ lint, build, test ]
environment: deployment
runs-on: ubuntu-latest
Expand All @@ -108,6 +108,20 @@ jobs:
git config --global user.name 'vikelabs-bot'
git config --global user.email 'vikelabs-bot-github@vikelabs.ca'

- name: Bump minor version
uses: 'phips28/gh-action-bump-version@master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-npm:
if: github.ref == 'refs/heads/master' && github.actor == 'vikelabs-bot'
needs: [ lint, build, test ]
environment: deployment
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v1
with:
Expand All @@ -124,11 +138,6 @@ jobs:
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-progress

- name: Bump minor version
uses: 'phips28/gh-action-bump-version@master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create .npmrc for auth token publishing
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
env:
Expand Down