From c7c566b8466c8c7c23229087dd1c2b0edde0cdf1 Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Sun, 14 Jul 2024 18:34:21 +0100 Subject: [PATCH] refactor: update release workflow with env var and allow dirty publish This commit updates the GitHub Actions release workflow. It introduces an environment variable PACKAGE_DIR to specify the directory of the package. The publish command is also updated to allow a dirty state. Additionally, a step is added to copy the LICENSE file to the package directory before publishing. --- .github/workflows/release.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3745a690..2209d09f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,6 +10,8 @@ permissions: jobs: jsr: + env: + PACKAGE_DIR: ${{github.workspace}}/packages/unplugin-typia runs-on: ubuntu-latest timeout-minutes: 10 permissions: @@ -23,8 +25,11 @@ jobs: with: bun-version: latest - run: bun i --frozen-lockfile - - run: bun run publish - working-directory: packages/unplugin-typia + - name: copy files + run: | + cp LICENSE $PACKAGE_DIR + - run: bun run publish --allow-dirty + working-directory: ${{env.PACKAGE_DIR}} release: needs: