chore: update version to 2.0.5 #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Deploy Bundle | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
check-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Version Check | |
id: check | |
uses: EndBug/[email protected] | |
- name: Has version changed? | |
if: steps.check.outputs.changed != 'true' | |
run: 'echo "No version change :/" && exit 1' | |
build: | |
needs: check-version | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [10.x, 12.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci | |
- run: npm run build --if-present | |
- run: npm test | |
- name: Upload dist files | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist-files | |
path: dist | |
commit: | |
needs: [build, check-version] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: https://registry.npmjs.org/ | |
- name: Download dist files | |
uses: actions/download-artifact@v2 | |
with: | |
name: dist-files | |
path: dist | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v4 | |
with: | |
author_name: mParticle Automation | |
author_email: [email protected] | |
message: 'Generate latest bundle' | |
force: true | |
add: 'dist/' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publish-npm: | |
needs: [build, check-version, commit] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: https://registry.npmjs.org/ | |
- run: npm ci | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} |