diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml new file mode 100644 index 0000000..3b2920d --- /dev/null +++ b/.github/workflows/bump.yml @@ -0,0 +1,29 @@ +name: Bump version + +# Bumps the patch version, commits, and pushes a v* tag. +# Pushing the tag triggers release.yml, which builds, publishes to npm, +# and cuts a GitHub Release. + +on: + workflow_dispatch: + +jobs: + bump: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.SDK_RELEASE_TOKEN }} + - uses: actions/setup-node@v4 + with: + node-version: 20 + - uses: pnpm/action-setup@v4 + - name: Configure git + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + - name: Bump patch version and tag + run: pnpm version patch -m "chore(release): %s" + - name: Push commit and tag + run: git push --follow-tags diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd6e732..8d3f3fd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,3 +22,8 @@ jobs: - run: pnpm publish --access public --no-git-checks env: NODE_AUTH_TOKEN: ${{secrets.CODEX_SDK_NPM_TOKEN}} + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.ref_name }} + generate_release_notes: true