Skip to content

feat: Auto Fixing for ternary operator #2

feat: Auto Fixing for ternary operator

feat: Auto Fixing for ternary operator #2

Workflow file for this run

name: Release Canary
on:
pull_request:
types: [labeled]
branches: ["*"]
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
works:
name: I work
runs-on: ubuntu-latest
steps:
- run: echo "I work"
release:
name: Release
timeout-minutes: 10
runs-on: ubuntu-latest
permissions: write-all
if: contains(github.event.pull_request.labels.*.name, 'release canary')
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Node.js
uses: pnpm/action-setup@v4
with:
run_install: |
- recursive: true
args: [--no-frozen-lockfile]
- name: Publish a Canary version
id: publish
run: |
pnpm changeset version --snapshot ${{ github.event.number }}
pnpm -w publish --access public --tag canary --no-git-checks
echo "published=true" >> "$GITHUB_OUTPUT"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
- name: Comment on PR
if: steps.publish.outputs.published == 'true'
uses: actions/github-script@v3
with:
github-token: ${{ secrets.MY_GITHUB_TOKEN }}
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `
🚀 Successfully released canary version to npm.
You can install it by running:
\`\`\`
pnpm add eslint-plugin-rtl@canary
\`\`\`
`.replace(/^\s+|\s+$/g, '')
})