feat: add wbtc #90
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: Build, tag, and publish a release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
tag: | |
name: Create tag for new version | |
runs-on: ubuntu-latest | |
outputs: | |
tag_name: ${{ steps.create_new_tag.outputs.tag }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Detect package version changes | |
uses: salsify/action-detect-and-tag-new-version@v2 | |
id: create_new_tag | |
release: | |
name: Create release | |
runs-on: ubuntu-latest | |
needs: tag | |
if: needs.tag.outputs.tag_name | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Create github release | |
uses: actions/create-release@v1 | |
id: create_release | |
env: | |
GITHUB_TOKEN: ${{ secrets.github_token }} | |
with: | |
tag_name: ${{ needs.tag.outputs.tag_name }} | |
release_name: ${{ needs.tag.outputs.tag_name }} | |
draft: false | |
prerelease: false | |
publish: | |
name: Build and publish | |
runs-on: ubuntu-latest | |
needs: tag | |
if: needs.tag.outputs.tag_name | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: yarn install | |
- name: Build | |
run: yarn build | |
- name: Publish to NPM | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |