Skip to content

Commit

Permalink
fix: resolve publish issues with building the snap site package (#290)
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Klick <[email protected]>
  • Loading branch information
nathanklick authored Apr 8, 2024
1 parent 2b8e1ae commit 2d16494
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/flow-publish-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
runs-on: [self-hosted, Linux, medium, ephemeral]
defaults:
run:
working-directory: "./packages/${{ github.event.inputs.snap-package-dir }}/"
working-directory: "./packages/${{ github.event.inputs.snap-package-dir }}/packages/snap"
steps:
- name: Checkout Code
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
Expand All @@ -120,12 +120,15 @@ jobs:
run: yarn run build

publish-release:
if: github.actor == 'NanaEC' || github.actor == 'nathanklick' || github.actor == 'kpachhai'
name: Publish Release
runs-on: [self-hosted, Linux, medium, ephemeral]
defaults:
run:
working-directory: "./packages/${{ github.event.inputs.snap-package-dir }}/packages/snap"
needs:
- validate-release
- run-safety-checks
if: ${{ github.actor == 'NanaEC' || github.actor == 'nathanklick' || github.actor == 'kpachhai' }}
steps:
- name: Checkout Code
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
Expand All @@ -146,14 +149,12 @@ jobs:
run: pnpm install -g yarn

- name: Yarn Build
working-directory: "./packages/${{ github.event.inputs.snap-package-dir }}"
run: |
yarn install
yarn run build
- name: Calculate Publish Arguments
id: publish
working-directory: "./packages/${{ github.event.inputs.snap-package-dir }}/packages/snap"
run: |
PUBLISH_ARGS="--access public --no-git-checks"
[[ "${{ github.event.inputs.dry-run-enabled }}" == "true" ]] && PUBLISH_ARGS="${PUBLISH_ARGS} --dry-run"
Expand All @@ -166,7 +167,6 @@ jobs:
if: ${{ github.event.inputs.dry-run-enabled != 'true' }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: "./packages/${{ github.event.inputs.snap-package-dir }}/packages/snap"
run: pnpm publish ${{ steps.publish.outputs.args }}

- name: Generate Github Release
Expand All @@ -177,4 +177,4 @@ jobs:
prerelease: ${{ needs.validate-release.outputs.prerelease == 'true' }}
draft: false
generateReleaseNotes: true
skipIfReleaseExists: true
skipIfReleaseExists: true

0 comments on commit 2d16494

Please sign in to comment.