PIPELINE-66 Migrate workflow to github action #6
Workflow file for this run
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
name: On code change | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build module | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '10.x' | |
- name: Install & build with yarn | |
run: | | |
yarn install | |
yarn build | |
test: | |
name: Run integration tests | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '10.x' | |
- name: test with yarn | |
run: | | |
yarn test | |
publish: | |
name: Publish to npm | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '10.x' | |
- name: Publish to npm | |
run: | | |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
yarn publish --access public |