Merge pull request #52 from easylogic/chore/changeset-log #17
Workflow file for this run
This file contains 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
name: '[RELEASE] Version Packages' | |
on: | |
push: | |
branches: | |
- 'release-*' | |
workflow_dispatch: | |
jobs: | |
release: | |
permissions: | |
contents: write # to create release (changesets/action) | |
pull-requests: write # to create pull request (changesets/action) | |
name: Release Version Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.ref }} # checkout PR branch | |
- name: Use Node.js 18.16.1 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.16.1' | |
- name: Initialize npmrc | |
run: | | |
echo "" > $(npm config get userconfig) | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Install dependencies with pnpm | |
run: pnpm install --no-frozen-lockfile | |
- name: Get branch name | |
id: get_branch | |
run: echo "::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/})" | |
- name: Create Release Pull Request or Publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
version: pnpm changeset version | |
commit: 'chore: update versions - ${{ steps.get_branch.outputs.branch }}' | |
title: 'chore: update versions - ${{ steps.get_branch.outputs.branch }}' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |