update run logic to consume commonjs output #10
Workflow file for this run
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: Release | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/composite/verify | |
- name: release-version | |
uses: actions/github-script@v7 | |
id: release-version | |
env: | |
GIT_TAG: ${{ github.ref_name }} | |
with: | |
script: | | |
const releaseVersion = process.env.GIT_TAG.slice(1); | |
console.log(`Release version: ${releaseVersion}`); | |
return releaseVersion; | |
result-encoding: string | |
- name: set version in package.json and publish | |
working-directory: dist/apps/cli | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.HD_CLI_NPM_TOKEN }} | |
run: | | |
npm version "${{ steps.release-version.outputs.result }}" --no-git-tag-version | |
npm publish |