diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index cbc494fb..5f0735e0 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -29,23 +29,16 @@ jobs: version: 9 - name: Install dependencies run: pnpm install - - name: Release as beta + - name: Bump version to prerelease + if: ${{ ! steps.release.outputs.release_created }} + run: npm version prerelease + - uses: stefanzweifel/git-auto-commit-action@v5 + if: ${{ ! steps.release.outputs.release_created }} + with: + commit_message: bump beta version + - name: Create beta zip if: ${{ ! steps.release.outputs.release_created }} run: | - # update package version - git_hash=$(git rev-parse --short "$GITHUB_SHA") - NEXT_VERSION=$(echo $(node -p "require('./package.json').version") | awk -F. -v OFS=. '{$NF += 1 ; print}') - BETA_VERSION="${NEXT_VERSION}-${git_hash}" - echo "New beta version for NPM: ${BETA_VERSION}" - npm version ${BETA_VERSION} - - # push changes - git config --global user.name github-actions - git config --global user.email github-actions@github.com - git add . - git commit -m "bump beta version" - git push - # now create zip file pnpm run build echo ${BETA_VERSION} > dist/version.txt