chore(deps-dev): bump @typescript-eslint/eslint-plugin from 6.15.0 to 6.21.0 #16
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: Publish canary | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
pr_commented: | |
name: PR commented | |
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/canary') }} | |
runs-on: ubuntu-latest | |
env: | |
PR_NUMBER: ${{ github.event.issue.number }} | |
steps: | |
- name: Auth | |
uses: actions/create-github-app-token@v1 | |
id: auth | |
with: | |
app-id: ${{ vars.APP_ID }} | |
private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Comment accepted | |
uses: peter-evans/create-or-update-comment@v3 | |
with: | |
token: ${{ steps.auth.outputs.token }} | |
comment-id: ${{ github.event.comment.id }} | |
reactions: heart | |
- id: branch | |
uses: xt0rted/pull-request-comment-branch@v2 | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ steps.branch.outputs.head_ref }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ vars.NODE_VERSION }} | |
- uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: npm-deps-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
npm-deps-${{ hashFiles('package-lock.json') }} | |
- name: Setup packages | |
run: npm ci | |
- name: Publish canary to NPM | |
id: canary | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
echo "Publishing from PR: ${{ github.event.issue.number }}. On branch: ${{ steps.branch.outputs.head_ref }}" | |
echo "Last commit: $(git log -1 --format='%H')" | |
short=$(git rev-parse --short HEAD) | |
version=0.0.0-$short | |
echo "Commit short: $short. Canary version: $version" | |
npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN | |
npm version $version --git-tag-version false | |
npm publish --tag canary | |
echo "version=$version" >> "$GITHUB_OUTPUT" | |
- name: Comment version to PR | |
uses: peter-evans/create-or-update-comment@v3 | |
with: | |
token: ${{ steps.auth.outputs.token }} | |
issue-number: ${{ github.event.issue.number }} | |
body: | | |
Canary available: `@taskany/colors@${{ steps.canary.outputs.version }}` | |