Bump up library version to 2.16.4 #46
This file contains hidden or 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 canary version to NPM | |
| on: | |
| push: | |
| branches: | |
| - 'release/*.0' | |
| - '!release/3.0.0' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Setup Node | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: '16.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: 📥 Install dependencies | |
| run: npm install | |
| - name: 🔧 Build | |
| run: | | |
| BRANCH_NAME=${{ github.ref }} | |
| COMMIT_SHA=$(git rev-parse --short HEAD) | |
| npm run build -- --pure --canary $BRANCH_NAME --commitSHA $COMMIT_SHA | |
| - name: 📦 Publish package on NPM | |
| run: cd dist && npm publish --access public --tag canary | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_ACCESS_TOKEN }} | |
| - name: 🔔 Send Notification | |
| env: | |
| INTERNAL_NOTIFICATION_CHANNEL_API_ENDPOINT: ${{ secrets.INTERNAL_NOTIFICATION_CHANNEL_API_ENDPOINT }} | |
| run: | | |
| VERSION=$(jq -r '.version' dist/package.json) | |
| VERSION_URL="https://www.npmjs.com/package/@geneui/components/v/$VERSION" | |
| MESSAGE="@channel\nNew canary version [$VERSION]($VERSION_URL) is published on NPM" | |
| curl -X POST -H "Content-Type: application/json" -d "{\"text\": \"$MESSAGE\", \"username\": \"NPM\", \"icon_url\": \"https://static-production.npmjs.com/b0f1a8318363185cc2ea6a40ac23eeb2.png\"}" $INTERNAL_NOTIFICATION_CHANNEL_API_ENDPOINT |