chore: fix typos #9
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: Snapshot PR Creation | |
on: | |
pull_request: | |
types: [labeled] | |
jobs: | |
create-snapshot-pr: | |
if: github.event.label.name == 'snapshot' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout main branch | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
fetch-depth: 0 | |
- name: Create or update the snapshot branch | |
run: git push origin main:refs/heads/snapshot --force | |
- name: Checkout the PR branch | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Create PR to snapshot | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PR_NUMBER: ${{ github.event.pull_request.number }} | |
PR_TITLE: ${{ github.event.pull_request.title }} | |
SOURCE_BRANCH: ${{ github.event.pull_request.head.ref }} | |
run: | | |
gh pr create \ | |
--base snapshot \ | |
--head "$SOURCE_BRANCH" \ | |
--title "chore: 🧪 release ($PR_TITLE)" \ | |
--body "This PR was automatically created from #$PR_NUMBER when the 'snapshot' label was added. | |
Merging this PR will trigger a snapshot package release to the NPM registry. | |
You will be able to install it under the 'snapshot' tag." |