Skip to content

Update Issues templates (#384) #33

Update Issues templates (#384)

Update Issues templates (#384) #33

name: Changeset Release
on:
workflow_dispatch:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
# Updated as per: https://github.com/changesets/action/issues/387#issuecomment-2336411095
permissions:
contents: write
pull-requests: write
id-token: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup pnpm (corepack enabled)
uses: pnpm/action-setup@v3
- name: Setup Node.js 20.x
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version-file: '.node-version'
cache: 'pnpm'
- name: Install Dependencies
run: pnpm ci:install
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
setupGitUser: true
commit: "👷 [ci]: Version Packages"
title: "👷 [ci]: Ready for Release"
version: pnpm ci:version
publish: pnpm ci:publish
env:
GITHUB_TOKEN: ${{ secrets.STUDIOCMS_SERVICE_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Add Label to CI PR
if: ${{ steps.changesets.outputs.hasChangesets == 'true' }}
run: gh pr edit "$PR_URL" --add-label "ci"
env:
PR_URL: ${{ steps.changesets.outputs.pull_request_url }}
GITHUB_TOKEN: ${{ secrets.STUDIOCMS_SERVICE_TOKEN }}