Skip to content

Commit

Permalink
Update release script to work with changesets bot
Browse files Browse the repository at this point in the history
  • Loading branch information
AdiRishi committed Dec 3, 2023
1 parent b17691a commit 4bae56c
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,25 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- name: Create Github Token as Changesets-Bot
id: create_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.CHANGESETS_RELEASE_APP_ID }}
private_key: ${{ secrets.CHANGESETS_RELEASE_PRIVATE_KEY }}

- name: Checkout Repo
uses: actions/checkout@v4
with:
token: ${{ steps.create_token.outputs.token }}
fetch-depth: 1
fetch-tags: true

- name: Setup git user as Changesets Bot
# The bot id is taken from https://api.github.com/users/changesets-release-app[bot]
run: |
git config --global user.name "changesets-release-app[bot]"
git config --global user.email "152388490+changesets-release-app[bot]@users.noreply.github.com"
- name: Setup pnpm and node
uses: pnpm/action-setup@v2
Expand All @@ -26,18 +43,15 @@ jobs:

- name: Install Dependencies
run: pnpm install
- name: Build package
run: pnpm build

- id: create_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.CHANGESETS_RELEASE_APP_ID }}
private_key: ${{ secrets.CHANGESETS_RELEASE_PRIVATE_KEY }}

- name: Create Release Pull Request
- name: Changesets Release
uses: changesets/action@v1
with:
commit: "chore(release): Release latest changesets"
title: "chore(release): Release latest changesets"
commit: 'chore(release): Release latest changesets'
title: 'chore(release): Release latest changesets'
setupGitUser: false
createGithubReleases: true
publish: pnpm changeset tag
env:
Expand Down

0 comments on commit 4bae56c

Please sign in to comment.