Skip to content

Commit

Permalink
build(components): fix workflow steps after release created
Browse files Browse the repository at this point in the history
Apparently, `release_created` is only set when creating a release for the root of the repo.
Instead, it seems that we can use `components--release_created`.
https://github.com/google-github-actions/release-please-action?tab=readme-ov-file#path-outputs
  • Loading branch information
fengelniederhammer committed Apr 24, 2024
1 parent 4cd3646 commit c7ec0f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release-components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ jobs:
target-branch: main

- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.release.outputs.components--release_created }}

- uses: actions/cache@v4
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.release.outputs.components--release_created }}
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('components/**/package-lock.json') }}

- name: Build
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.release.outputs.components--release_created }}
run:
npm ci
npm run build
working-directory: components

- name: Publish
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.release.outputs.components--release_created }}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
Expand Down

0 comments on commit c7ec0f8

Please sign in to comment.