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
24 changes: 11 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Changelog
runs-on: ubuntu-latest
outputs:
hasChangesets: ${{ steps.changesets.outputs.hasChangesets }}
hasChangesets: ${{ steps.changesets.outputs.has-changesets }}
releaseExists: ${{ steps.published.outputs.exists }}
permissions:
contents: write
Expand All @@ -36,16 +36,15 @@ jobs:
id: changesets
uses: changesets/action@8488615a623b1b9c987934bb89eae8af6a946ac1 # v2.1.1
with:
commit: "chore: release"
prDraft: create
title: "chore: release"
version: npm run version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: release"
github-token: ${{ secrets.GITHUB_TOKEN }}
pr-draft: create
pr-title: "chore: release"
version-script: npm run version

- name: Check if publish is needed
id: published
if: steps.changesets.outputs.hasChangesets == 'false'
if: steps.changesets.outputs.has-changesets == 'false'
run: |
VERSION=$(node -p "require('./package.json').version")
if gh release view "v${VERSION}" &>/dev/null; then
Expand Down Expand Up @@ -95,10 +94,9 @@ jobs:
id: changesets
uses: changesets/action@8488615a623b1b9c987934bb89eae8af6a946ac1 # v2.1.1
with:
createGithubReleases: true
publish: npm run changeset -- publish
env:
GITHUB_TOKEN: ${{ steps.credentials.outputs.token }}
create-github-releases: true
github-token: ${{ steps.credentials.outputs.token }}
publish-script: npm run changeset -- publish

- name: Get publication details
if: steps.changesets.outputs.published == 'true'
Expand All @@ -108,7 +106,7 @@ jobs:
echo "message=$(echo "$PUBLISHED_PACKAGES" | jq -r '.[] | "\(.name)@\(.version)"' | paste -sd ', ' -)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.credentials.outputs.token }}
PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.publishedPackages }}
PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.published-packages }}

- name: Notify Slack
if: steps.changesets.outputs.published == 'true'
Expand Down