diff --git a/.github/workflows/release_version.yml b/.github/workflows/release_version.yml index 1ea0cde5..37679bca 100644 --- a/.github/workflows/release_version.yml +++ b/.github/workflows/release_version.yml @@ -56,27 +56,30 @@ jobs: ./scripts/commitVersion.sh echo New version: new_version=$(node -p -e "require('./package.json').version") + git checkout -b "purista_v$new_version" echo "new_version=$new_version" >> $GITHUB_OUTPUT id: bump_version + - name: Dry run publish + run: | + npm publish --access public --dry-run --workspaces + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Commit version bump uses: planetscale/ghcommit-action@v0.1.6 with: commit_message: 'chore: bump ${{ inputs.version }} version to v${{ steps.bump_version.outputs.new_version }}' repo: ${{ github.repository }} - branch: ${{ github.head_ref || github.ref_name }} + branch: 'purista_v${{ steps.bump_version.outputs.new_version }}' env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Add Tag run: | git tag -a "v${{ steps.bump_version.outputs.new_version }}" -m "v${{ steps.bump_version.outputs.new_version }}" - - name: Dry run publish - run: | - npm publish --access public --dry-run --workspaces + git push origin -u purista_v${{ steps.bump_version.outputs.new_version }} + - name: create pull request + run: gh pr create -B master -H purista_v${{ steps.bump_version.outputs.new_version }} --title 'Merge purista_v${{ steps.bump_version.outputs.new_version }} into master' --body 'Created by Github action' env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Push to origin - run: | - git push origin --tags --follow-tags + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Publish to NPM run: npm publish --access public --workspaces env: