Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@ jobs:
pull-requests: write
id-token: write
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ secrets.RELEASE_BOT_APP_ID }}
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}

- name: Checkout Repo
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}

- uses: pnpm/action-setup@v4

Expand All @@ -29,29 +37,22 @@ jobs:
with:
node-version: 24.x
cache: "pnpm"
registry-url: "https://registry.npmjs.org"

# Trusted Publishing (OIDC) needs npm >= 11.5.1; the runner's bundled npm may be older.
- name: Update npm for trusted publishing
run: npm install -g npm@latest

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
email=vojtech@miksu.cz
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GIT_DEPLOY_KEY }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

- name: Publishing next version
run: cd packages/ladle && pnpm types && ./publish-next.js
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading