RHIDP-3139: fix(sidebar): update selected item bg color to match PF5 #32
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-pr-package | |
# SECURITY NOTE: | |
# pull_request_target is used to run the workflow on pull requests from ANY FORK! | |
# This is required to have access to the secret to publish the PR to npm. | |
# For that reason, any outside collaborator requires approval from a contributor. | |
# https://github.com/redhat-developer/red-hat-developer-hub-theme/settings/actions | |
on: | |
pull_request_target: | |
types: [opened, synchronize, reopened] | |
jobs: | |
release-pr-package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Lint | |
run: npm run lint | |
- name: Test | |
run: npm test | |
- name: Publish to npm | |
run: | | |
# bash | |
short_sha=${GITHUB_SHA::7} | |
npm version "0.0.0-pr-${{ github.event.number }}-${short_sha}" --no-git-tag-version | |
npm publish --access=public --tag=latest-pr | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Add comment | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
// js | |
short_sha = process.env.GITHUB_SHA.slice(0, 7) | |
version = `0.0.0-pr-${{ github.event.number }}-${short_sha}` | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: `New package is available at: \`@redhat-developer/red-hat-developer-hub-theme@${version}\`` | |
}) |