From b5fa6e42c415384843f67a2160c19dfcc4aed58a Mon Sep 17 00:00:00 2001 From: i-am-yongho Date: Wed, 18 Dec 2024 23:00:30 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[#64]=20=F0=9F=91=B7=20replace=20Changeset?= =?UTF-8?q?=20with=20NaverPayDev/changeset-actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/changeset-publish.yml | 42 +++++++++++++++++++++ .github/workflows/changesets-detect-add.yml | 39 +++++++++++++++++++ .github/workflows/release.yaml | 38 ------------------- 3 files changed, 81 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/changeset-publish.yml create mode 100644 .github/workflows/changesets-detect-add.yml delete mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/changeset-publish.yml b/.github/workflows/changeset-publish.yml new file mode 100644 index 0000000..89ab175 --- /dev/null +++ b/.github/workflows/changeset-publish.yml @@ -0,0 +1,42 @@ +name: changeset-publish + +on: + push: + branches: + - main + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + token: ${{ secrets.ACTION_TOKEN }} + fetch-depth: 0 + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'pnpm' + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - uses: NaverPayDev/changeset-actions/publish@main + with: + github_token: ${{ secrets.ACTION_TOKEN }} + npm_token: ${{ secrets.NPM_TOKEN }} + publish_script: pnpm release + git_username: npay-fe-bot + git_email: npay.fe.bot@navercorp.com + pr_title: 🚀 version changed packages + commit_message: 📦 bump changed packages version + create_github_release_tag: true + formatting_script: pnpm markdownlint:fix diff --git a/.github/workflows/changesets-detect-add.yml b/.github/workflows/changesets-detect-add.yml new file mode 100644 index 0000000..016ec6f --- /dev/null +++ b/.github/workflows/changesets-detect-add.yml @@ -0,0 +1,39 @@ +name: changeset-detect-add +on: + pull_request: + branches: + - '**' + types: [opened, reopened, synchronize] + +jobs: + detect-add: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + token: ${{ secrets.ACTION_TOKEN }} + fetch-depth: 0 + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'pnpm' + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Detect Changed Packages + uses: NaverPayDev/changeset-actions/detect-add@main + with: + github_token: ${{ secrets.ACTION_TOKEN }} + packages_dir: packages + skip_label: skip-detect-change + skip_branches: main + formatting_script: pnpm markdownlint:fix diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 3b9ed89..0000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: release packages - -on: - push: - branches: - - main - -concurrency: ${{ github.workflow }}-${{ github.ref }} - -jobs: - release: - name: Release - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v3 - - - name: Setup Node.js 20.x - uses: actions/setup-node@v3 - with: - node-version: 20.x - - - name: Install dependencies - uses: pnpm/action-setup@v3 - with: - version: 9 - run_install: true - - - name: Create Release Pull Request or Publish to npm - id: changesets - uses: changesets/action@v1 - with: - title: '🚀 version changed packages' - commit: '📦 bump changed packages version' - publish: pnpm release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} From e35b8897a842be2b231982b485b61ec087cf42f4 Mon Sep 17 00:00:00 2001 From: i-am-yongho Date: Thu, 19 Dec 2024 10:14:03 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[#64]=20=F0=9F=90=9B=20package=20manager=20?= =?UTF-8?q?should=20be=20pre-installed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/changeset-publish.yml | 6 +++--- .github/workflows/changesets-detect-add.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/changeset-publish.yml b/.github/workflows/changeset-publish.yml index 89ab175..a8892de 100644 --- a/.github/workflows/changeset-publish.yml +++ b/.github/workflows/changeset-publish.yml @@ -17,15 +17,15 @@ jobs: token: ${{ secrets.ACTION_TOKEN }} fetch-depth: 0 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + - name: Setup node uses: actions/setup-node@v4 with: node-version: '22' cache: 'pnpm' - - name: Setup pnpm - uses: pnpm/action-setup@v4 - - name: Install dependencies run: pnpm install --frozen-lockfile diff --git a/.github/workflows/changesets-detect-add.yml b/.github/workflows/changesets-detect-add.yml index 016ec6f..e4be61b 100644 --- a/.github/workflows/changesets-detect-add.yml +++ b/.github/workflows/changesets-detect-add.yml @@ -17,15 +17,15 @@ jobs: token: ${{ secrets.ACTION_TOKEN }} fetch-depth: 0 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + - name: Setup node uses: actions/setup-node@v4 with: node-version: '22' cache: 'pnpm' - - name: Setup pnpm - uses: pnpm/action-setup@v4 - - name: Install dependencies run: pnpm install --frozen-lockfile