Skip to content

Commit

Permalink
chore: modify workflows to skip publish upon a prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
CristiCanizales committed Aug 28, 2024
1 parent 56e39c6 commit 86b7d7c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/esbuild-publish.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
name: esbuild Compilation & npm Publish Workflow

on:
workflow_run:
workflows:
- create-github-release
types:
- completed
workflow_call:
inputs:
branch:
description: 'Set the branch to use for automation tests'
type: string
required: false
default: 'main'
nodeVersion:
description: version of node to use. It's better to specify latest, lts/* or lts/-1 than to hardode numbers
type: string
default: lts/*
required: false
workflow_dispatch:
inputs:
branch:
Expand All @@ -14,22 +21,22 @@ on:
required: false
default: 'main'
nodeVersion:
description: version of node to use. It's better to specify latest, lts/* or lts/-1 than to hardode numbers
description: version of node to use. It's better to specify latest, lts/* or lts/-1 than to hardode numbers
type: string
default: lts/*
required: false

jobs:
build:
runs-on: ubuntu-latest
if: ${{ inputs.branch || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')}}
if: ${{ inputs.branch }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- uses: actions/setup-node@v4
with:
node-version: ${{ inputs.nodeVersion || 'lts/*' }}
node-version: ${{ inputs.nodeVersion }}
registry-url: 'https://registry.npmjs.org'
cache: yarn
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/onRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,12 @@ jobs:
tag: ${{ needs.getDistTag.outputs.tag || 'latest' }}
githubTag: ${{ github.event.release.tag_name || inputs.tag }}
secrets: inherit

publish-bundle:
if: ${{ success() && needs.getDistTag.outputs.tag == '' }}
uses: ./.github/workflows/esbuild-publish.yml
needs: [getDistTag, npm]
with:
branch: 'main'
nodeVersion: 'lts/*'
secrets: inherit

2 comments on commit 86b7d7c

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger Benchmarks - ubuntu-latest

Benchmark suite Current: 86b7d7c Previous: ebdb003 Ratio
Child logger creation 469987 ops/sec (±0.90%) 467269 ops/sec (±2.84%) 0.99
Logging a string on root logger 826024 ops/sec (±7.99%) 821285 ops/sec (±8.05%) 0.99
Logging an object on root logger 636393 ops/sec (±7.30%) 646915 ops/sec (±6.68%) 1.02
Logging an object with a message on root logger 20059 ops/sec (±187.12%) 20088 ops/sec (±186.20%) 1.00
Logging an object with a redacted prop on root logger 509886 ops/sec (±5.94%) 505135 ops/sec (±9.65%) 0.99
Logging a nested 3-level object on root logger 20225 ops/sec (±185.39%) 21101 ops/sec (±185.24%) 1.04

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger Benchmarks - windows-latest

Benchmark suite Current: 86b7d7c Previous: ebdb003 Ratio
Child logger creation 339339 ops/sec (±1.81%) 341942 ops/sec (±0.37%) 1.01
Logging a string on root logger 807675 ops/sec (±5.42%) 815333 ops/sec (±5.74%) 1.01
Logging an object on root logger 607160 ops/sec (±6.90%) 599823 ops/sec (±6.65%) 0.99
Logging an object with a message on root logger 4750 ops/sec (±210.31%) 5513 ops/sec (±205.50%) 1.16
Logging an object with a redacted prop on root logger 435370 ops/sec (±11.38%) 448937 ops/sec (±12.12%) 1.03
Logging a nested 3-level object on root logger 336967 ops/sec (±4.62%) 309332 ops/sec (±5.79%) 0.92

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.