fix: port parsing in CLI no longer always returns NaN (#47) #5
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 to Npm | |
on: | |
push: | |
branches: [main] | |
paths: | |
- "apps/cli/**" | |
jobs: | |
check: | |
name: "Check if release is needed" | |
runs-on: "ubuntu-latest" | |
outputs: | |
exists: ${{ steps.check-tag.outputs.exists }} | |
steps: | |
- uses: actions/checkout@v4 | |
# retrieves the version from package.json | |
- uses: martinbeentjes/npm-get-version-action@main | |
id: get-version | |
# check if the tag exists on the repo | |
- uses: mukunku/[email protected] | |
id: check-tag | |
with: | |
tag: v${{ steps.get-version.outputs.current-version }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
release: | |
name: "Release" | |
needs: check | |
if: needs.check.outputs.exists == 'false' | |
runs-on: "ubuntu-latest" | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: martinbeentjes/npm-get-version-action@main | |
id: get-version | |
- uses: actions/create-release@v1 | |
id: create-release | |
with: | |
draft: false | |
prerelease: false | |
release_name: v${{ steps.get-version.outputs.current-version}} | |
tag_name: v${{ steps.get-version.outputs.current-version}} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./tooling/github/setup | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm --filter=bumpgen run build | |
- run: pnpm --filter=bumpgen publish --tag latest --access public --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: "${{ secrets.NPM_TOKEN }}" |