diff --git a/.github/workflows/feature-branch-prerelease.yml b/.github/workflows/feature-branch-prerelease.yml index 3b61257..6ea9c18 100644 --- a/.github/workflows/feature-branch-prerelease.yml +++ b/.github/workflows/feature-branch-prerelease.yml @@ -83,22 +83,18 @@ jobs: run: | echo "PREID=$(echo '${{ steps.branch-name.outputs.current_branch }}' | tr -cd '[:lower:]')" >> $GITHUB_ENV - # Use --no-push to prevent pushing to remote - # Example: - # - feature-branch-name -> featurebranchname - # - minor: 1.0.0 -> 1.1.0-featurebranchname.0 - - name: Dry run pre-release version - if: ${{ github.event.inputs.releaseType == 'dry-run' }} - run: | - GH_TOKEN=${{ secrets.GITHUB_TOKEN }} npm run deploy:version -- -y --no-private --conventional-prerelease --preid ${{ env.PREID }} --allow-branch ${{ steps.branch-name.outputs.current_branch }} --no-changelog --no-push - - - name: Pre-release version - if: ${{ github.event.inputs.releaseType == 'prerelease' }} - run: | - GH_TOKEN=${{ secrets.GITHUB_TOKEN }} npm run deploy:version -- -y --no-private --conventional-prerelease --preid ${{ env.PREID }} --allow-branch ${{ steps.branch-name.outputs.current_branch }} --create-release github + - name: Conventional Changelog Action + id: changelog + uses: TriPSs/conventional-changelog-action@v3.7.1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + version-file: './package.json,./package-lock.json' + pre-release: true + pre-release-identifier: ${{ env.PREID }} # Use 'from git' option if `lerna version` has already been run - name: Publish Release to NPM if: ${{ github.event.inputs.releaseType == 'prerelease' }} - run: | - GH_TOKEN=${{ secrets.GITHUB_TOKEN }} npm run deploy:publish -- from-git -y --ignore-scripts --pre-dist-tag ${{ env.PREID }} + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}