diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2223ae1..d838f01 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Release +name: Publish on: release: @@ -39,4 +39,4 @@ jobs: accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }} directory: storybook-static - branch: ${{ github.event_name == 'push' && github.ref_name || github.event_name == 'repository_dispatch' && 'main' || format('pr/{0}', github.event.pull_request.number) }} + branch: ${{ github.event_name == 'release' && github.ref_name || format('pr/{0}', github.event.pull_request.number) }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 87985ba..83af87c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,9 +22,6 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install dependencies - run: npm install - - name: Set version run: | # Remove the "v" from the version. @@ -33,6 +30,9 @@ jobs: sed -i 's/version = "0.0.0-git"/version = "'${VERSION}'"/' package.json + - name: Install dependencies + run: npm install + - name: Create NPM package run: npm run build