Skip to content

Merge pull request #403 from wso2/changeset-release/next #146

Merge pull request #403 from wso2/changeset-release/next

Merge pull request #403 from wso2/changeset-release/next #146

Workflow file for this run

# -------------------------------------------------------------------------------------
#
# 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 }}