Skip to content

Commit

Permalink
Tweak prerelase job
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelly Wallach committed Aug 9, 2024
1 parent 6283431 commit dbdd7b6
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions .github/workflows/feature-branch-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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 }}

0 comments on commit dbdd7b6

Please sign in to comment.