Merge pull request #403 from wso2/changeset-release/next #146
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ------------------------------------------------------------------------------------- | |
| # | |
| # Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com). | |
| # | |
| # WSO2 LLC. licenses this file to you under the Apache License, | |
| # Version 2.0 (the "License"); you may not use this file except | |
| # in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, | |
| # software distributed under the License is distributed on an | |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| # KIND, either express or implied. See the License for the | |
| # specific language governing permissions and limitations | |
| # under the License. | |
| # | |
| # -------------------------------------------------------------------------------------- | |
| # This workflow will release the packages. | |
| name: π Release | |
| on: | |
| push: | |
| branches: [next] | |
| paths-ignore: | |
| - 'LICENSE' | |
| workflow_dispatch: | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| env: | |
| GH_TOKEN: ${{ secrets.UI_BOT_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.WSO2_NPM_TOKEN }} | |
| SHOULD_GENERATE_CHANGESET: 'true' | |
| jobs: | |
| release: | |
| name: π¦ Release | |
| if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [lts/*] | |
| pnpm-version: [latest] | |
| steps: | |
| - name: β¬οΈ Checkout | |
| id: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ env.GH_TOKEN }} | |
| - name: π₯‘ Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: ${{ matrix.pnpm-version }} | |
| run_install: false | |
| cache: true | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: π’ Setup node | |
| id: setup-node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'pnpm' | |
| - name: π§© Install Dependencies | |
| id: install-dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: ποΈ Build | |
| id: build | |
| run: pnpm build | |
| - name: π£ Create Release Pull Request or Publish to npm | |
| if: ${{ env.SHOULD_GENERATE_CHANGESET == 'true' }} | |
| id: changesets | |
| uses: changesets/[email protected] | |
| with: | |
| title: '[Release] [GitHub Action] Update package versions' | |
| publish: pnpm publish:packages | |
| version: pnpm version:packages | |
| commit: "[WSO2 Release] [GitHub Action] [Release] [${{ github.ref_name }}] [skip ci] update package versions" | |
| env: | |
| NPM_TOKEN: ${{ env.NPM_TOKEN }} | |
| GITHUB_TOKEN: ${{ env.GH_TOKEN }} |