From cfef5ecbb4a03187bbbb7592738fecdefdb26df8 Mon Sep 17 00:00:00 2001 From: Johan Ljunggren Date: Sun, 8 Sep 2024 20:11:58 +0200 Subject: [PATCH] Fix release pipeline (#20) --- .github/workflows/build-push-release.yml | 10 ++++++++-- src/action.ts | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-push-release.yml b/.github/workflows/build-push-release.yml index 93df26c..1f79aaa 100644 --- a/.github/workflows/build-push-release.yml +++ b/.github/workflows/build-push-release.yml @@ -51,13 +51,19 @@ jobs: - name: Check for dist changes id: check_dist_changes run: | + git status git add dist if [ -n "$(git diff --name-only --staged)" ]; then - echo "dist_changed=true" >> "$GITHUB_OUTPUT" + echo "dist_changed=true" >> $GITHUB_OUTPUT else - echo "dist_changed=false" >> "$GITHUB_OUTPUT" + echo "dist_changed=false" >> $GITHUB_OUTPUT fi + # Notify if no changes to release or pre-release + - name: Notify no changes + if: steps.check_dist_changes.outputs.dist_changed == 'false' + run: echo "::notice::There were no changes to release or pre-release." + # Update the version in package.json if dist has changed - name: Update package.json version if: steps.check_dist_changes.outputs.dist_changed == 'true' diff --git a/src/action.ts b/src/action.ts index 8c63078..07a2095 100644 --- a/src/action.ts +++ b/src/action.ts @@ -14,7 +14,7 @@ export async function run() { // Load the configuration const workspacePath = process.env.GITHUB_WORKSPACE || ''; const config = loadConfig(workspacePath); - console.log('Config loaded:', JSON.stringify(config, null, 2)); + console.log('Config loaded: ', JSON.stringify(config, null, 2)); core.debug(`Loaded config: ${JSON.stringify(config)}`); const time = (new Date()).toTimeString();