From 5e68ba7594c5bc7e24b29bf052a4f9d6ebf54374 Mon Sep 17 00:00:00 2001 From: wan92hen Date: Wed, 14 Dec 2022 15:39:04 +0800 Subject: [PATCH] ci: update action --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de7acfd..6d829fb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,7 +50,7 @@ jobs: - name: Compress zip run: | PACKAGE_VERSION=$(sed -nE 's/^\s*"version": "(.*?)",$/\1/p' package.json) - PACKAGE_NAME=${GITHUB_REPOSITORY_NAME_PART} + PACKAGE_NAME=${GITHUB_REPOSITORY_NAME_PART_SLUG} PRE_ZIP_FOLDER=${PACKAGE_NAME}-${PACKAGE_VERSION} ARTIFACT_NAME=${PRE_ZIP_FOLDER}.zip ARTIFACT_PATHNAME=dist/${ARTIFACT_NAME} @@ -107,9 +107,12 @@ jobs: - name: Build distribution run: | pnpm build + - name: Inject slug/short variables + uses: rlespinasse/github-slug-action@v4 - name: Compress zip run: | PACKAGE_VERSION=$(sed -nE 's/^\s*"version": "(.*?)",$/\1/p' package.json) + PACKAGE_NAME=${GITHUB_REPOSITORY_NAME_PART_SLUG} PRE_ZIP_FOLDER=${PACKAGE_NAME}-${PACKAGE_VERSION} ARTIFACT_NAME=${PRE_ZIP_FOLDER}.zip ARTIFACT_PATHNAME=dist/${ARTIFACT_NAME}