Pre-release mode for dev branch #2
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: Ensure pre-release mode | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
branches: | |
- dev | |
jobs: | |
enter-pre: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
if: ${{ github.event_name != 'pull_request' }} | |
- uses: actions/checkout@v4 | |
if: ${{ github.event_name == 'pull_request' }} | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} # required to checkout the repo when triggered through PRs | |
ref: ${{ github.event.pull_request.head.ref }} # required to checkout the repo when triggered through PRs | |
- uses: pnpm/action-setup@v4 | |
- name: Use Node.js 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
- name: Install pnpm dependencies | |
run: pnpm install | |
- name: Enter pre-release mode | |
run: | | |
pnpm changeset pre enter dev | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Add changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: '[".changeset"]' | |
default_author: github_actions | |
message: enter pre-release mode |