Merge pull request #95 from dxc-technology/dependabot/npm_and_yarn/li… #63
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: Publish Next Version | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
registry-url: https://registry.npmjs.org/ | |
- name: Install lib dependencies | |
run: cd lib && npm install | |
- name: Build library | |
run: cd lib && npm run build | |
- name: Test library | |
run: cd lib && npm run test:coverage | |
- name: Publish NEXT version to npm | |
run: | | |
sed -i "s#\"version\": \"0.0.0\"#\"version\": \"0.0.0-${GITHUB_SHA:0:7}\"#" ./lib/dist/package.json | |
cd lib/dist | |
npm publish --tag next --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} |