diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b3764b7..126eea6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,18 +38,19 @@ jobs: run: pnpm install --frozen-lockfile shell: bash - - name: Create release pull request or publish to npm + # https://docs.npmjs.com/staged-publishing + - name: Create release pull request or stage to npm id: changesets uses: changesets/action@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2 with: - publish-script: pnpm publish + publish-script: pnpm stage publish --provenance - - name: Send a Slack notification if a publish happens + - name: Send a Slack notification if a staging happens if: ${{ steps.changesets.outputs.has-changesets == 'false' }} env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} run: | VERSION=$(jq -r '.version' package.json) curl -X POST -H 'Content-type: application/json'\ - --data '{"blocks":[{"type":"section","text":{"type":"mrkdwn","text":"npm에 `@portone/react-native-sdk` 버전 *v'"$VERSION"'* 가 배포되었습니다 :rocket:"}},{"type":"actions","elements":[{"type":"button","text":{"type":"plain_text","text":"npm 페이지 보기"},"value":"show_npm_page","url":"https://www.npmjs.com/package/@portone/react-native-sdk/v/'"$VERSION"'","action_id":"show_npm_page"},{"type":"button","text":{"type":"plain_text","text":"체인지로그 보기"},"value":"show_changelog","url":"https://github.com/portone-io/react-native-sdk/blob/main/CHANGELOG.md","action_id":"show_changelog"}]}]}'\ + --data '{"blocks":[{"type":"section","text":{"type":"mrkdwn","text":"npm에 `@portone/react-native-sdk` 버전 *v'"$VERSION"'* 가 스테이징되었습니다. 메인테이너의 승인(2FA) 후 배포됩니다 :hourglass_flowing_sand:\n승인: npmjs.com 패키지 페이지의 *Staged Packages* 탭 또는 `npm stage list @portone/react-native-sdk` → `npm stage approve `"}},{"type":"actions","elements":[{"type":"button","text":{"type":"plain_text","text":"npm 페이지 보기"},"value":"show_npm_page","url":"https://www.npmjs.com/package/@portone/react-native-sdk","action_id":"show_npm_page"},{"type":"button","text":{"type":"plain_text","text":"체인지로그 보기"},"value":"show_changelog","url":"https://github.com/portone-io/react-native-sdk/blob/main/CHANGELOG.md","action_id":"show_changelog"}]}]}'\ "$SLACK_WEBHOOK_URL"