Add routing to registry from registration #49
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 and Release | |
on: | |
push: | |
branches: | |
- main | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build, Test and Release | |
runs-on: ubuntu-latest | |
env: | |
PROJECT_NAME: 'blockcore-hub' | |
steps: | |
- uses: actions/checkout@master | |
name: Checkout | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
registry-url: 'https://registry.npmjs.org' | |
- name: Variables | |
run: | | |
echo VERSION=$(npm run version --silent) >> $GITHUB_ENV | |
shell: bash | |
- name: Package Name | |
run: | | |
echo RELEASE_NAME=${{ env.PROJECT_NAME }}-${{ env.VERSION }}.tgz >> $GITHUB_ENV | |
shell: bash | |
# - name: Install and Build | |
# run: | | |
# npm install | |
# npm run build | |
# - name: Run Tests | |
# run: | | |
# npm run test | |
- name: Package | |
run: | | |
npm pack | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: ${{env.PROJECT_NAME}}-preview-${{env.VERSION}} | |
path: "${{env.RELEASE_NAME}}" | |
- name: Release | |
uses: sondreb/action-release@main | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: "${{env.RELEASE_NAME}}" | |
draft: true | |
prerelease: false | |
name: "Blockcore Hub (${{env.VERSION}})" | |
tag: ${{env.VERSION}} |