feat(utils): add sorting of audit issues for report md #179
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 Packages | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
dryRun: | |
type: choice | |
description: 'Dry run' | |
required: true | |
default: 'false' | |
options: | |
- 'true' | |
- 'false' | |
env: | |
NX_NON_NATIVE_HASHER: true | |
jobs: | |
dry-run-release: | |
if: | | |
github.repository == 'code-pushup/cli' && ( | |
github.event_name == 'pull_request' || | |
(github.event_name == 'workflow_dispatch' && github.event.inputs.dryRun == 'true') | |
) | |
name: Dry run release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Execute version target | |
run: npx nx version @code-pushup/cli-source --dryRun | |
- name: Deploy to NPM | |
run: npx nx run-many --target=deploy --dry-run | |
release: | |
if: | | |
github.repository == 'code-pushup/cli' && ( | |
(github.event_name == 'workflow_dispatch' && github.event.inputs.dryRun == 'false') || | |
(github.event_name == 'push') | |
) | |
name: Release packages | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Generate a token | |
id: generate_token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ secrets.GH_APP_ID }} | |
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ steps.generate_token.outputs.token }} | |
- name: Set up Git | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: npm | |
- name: Install dependencies | |
run: npm ci | |
- name: Execute version target on all affected packages and release them | |
env: | |
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} | |
run: npx nx version @code-pushup/cli-source | |
- name: Deploy to NPM | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# un-exclude packages when they're ready for public release | |
run: | | |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc | |
npx nx run-many -t=deploy --exclude=plugin-lighthouse,nx-plugin |