NPM Publish #133
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: NPM Publish | |
on: | |
push: | |
branches: [master] | |
schedule: | |
- cron: "0 13 * * 1" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Begin... | |
uses: actions/checkout@v2 | |
- name: Use Node 14 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14 | |
- name: Install dependencies | |
run: yarn install | |
- name: Update list | |
run: curl https://chainid.network/chains.json | json_pp -json_opt pretty,canonical > chains.json | |
- name: Test | |
run: yarn test | |
- name: Version | |
uses: "phips28/gh-action-bump-version@master" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: Publish | |
run: echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc && npm publish --access public | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Notify | |
run: | | |
curl -H "Content-Type: application/json" -d '{ "content": "✨ new version of @raiddotfarm/get-chain-name published"}' "$DISCORD_WEBHOOK" | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} |