diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 9c2b22e..5b2b9dc 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -17,6 +17,16 @@ on: description: 'Correlates the origin job with the child instance since process start does not return an ID.' type: string required: false + isRelease: + description: 'Indicates that the calling workflow was triggered by a release.' + type: boolean + required: false + default: false + isPrerelease: + description: 'Indicates that the calling release is a prerelease.' + type: boolean + required: false + default: false outputs: channel: description: 'The channel that the build should be published to.' @@ -38,6 +48,9 @@ jobs: # Execute the workflow uses: ./.github/workflows/Metadata.yml + with: + isRelease: ${{ inputs.isRelease }} + isPrerelease: ${{ inputs.isPrerelease }} # Execution session that builds the artifacts that are used for deployment Build-Prod: diff --git a/.github/workflows/Metadata.yml b/.github/workflows/Metadata.yml index 2df6cec..fbab80b 100644 --- a/.github/workflows/Metadata.yml +++ b/.github/workflows/Metadata.yml @@ -13,6 +13,16 @@ on: description: 'Correlates the origin job with the child instance since process start does not return an ID.' type: string required: false + isRelease: + description: 'Indicates that the calling workflow was triggered by a release.' + type: boolean + required: false + default: false + isPrerelease: + description: 'Indicates that the calling release is a prerelease.' + type: boolean + required: false + default: false outputs: channel: description: 'The channel that the build should be published to.' @@ -66,9 +76,9 @@ jobs: id: computedChannel background: true run: | - if [ "${{ github.event_name }}" = "release" ] && [ "${{ github.event.release.prerelease }}" = "true" ]; then + if [ "${{ inputs.isRelease }}" = "true" ] && [ "${{ inputs.isPrerelease }}" = "true" ]; then echo "channel=beta" >> "$GITHUB_OUTPUT" - elif [ "${{ github.event_name }}" = "release" ]; then + elif [ "${{ inputs.isRelease }}" = "true" ]; then echo "channel=stable" >> "$GITHUB_OUTPUT" else echo "channel=alpha" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/Publish.yml b/.github/workflows/Publish.yml index c5c379a..c013e03 100644 --- a/.github/workflows/Publish.yml +++ b/.github/workflows/Publish.yml @@ -22,6 +22,9 @@ jobs: # Execute the workflow uses: ./.github/workflows/Build.yml + with: + isRelease: true + isPrerelease: ${{ github.event.release.prerelease }} # Execution Session that deploys the artifact to NPM Deploy-NPM: diff --git a/.github/workflows/Security-AdvancedSecretScan.yml b/.github/workflows/Security-AdvancedSecretScan.yml index eb3a582..853a239 100644 --- a/.github/workflows/Security-AdvancedSecretScan.yml +++ b/.github/workflows/Security-AdvancedSecretScan.yml @@ -27,6 +27,7 @@ jobs: # Sets the scopes available to the github_token injected to the GH Actions runner permissions: contents: read + issues: write steps: # Calculate the depth and branch for checkout optimization diff --git a/package-lock.json b/package-lock.json index 4c06461..cb387c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@software-hardware-integration-lab/log-engine", - "version": "0.0.5", + "version": "0.0.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@software-hardware-integration-lab/log-engine", - "version": "0.0.5", + "version": "0.0.6", "hasInstallScript": true, "dependencies": { "typia": "~12.1.1" diff --git a/package.json b/package.json index 9e48a7e..2bbd790 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.0.5", + "version": "0.0.6", "name": "@software-hardware-integration-lab/log-engine", "description": "Logging engine with ability to add plugins for any destination", "author": {