From d059c397dbd5906f17383ed08025aeca36fac237 Mon Sep 17 00:00:00 2001 From: BugKing Date: Wed, 14 Dec 2022 07:25:32 +0000 Subject: [PATCH] ci: add 'Inject slug' step in action --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ebf7866..de7acfd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,10 +45,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##*/} + PACKAGE_NAME=${GITHUB_REPOSITORY_NAME_PART} PRE_ZIP_FOLDER=${PACKAGE_NAME}-${PACKAGE_VERSION} ARTIFACT_NAME=${PRE_ZIP_FOLDER}.zip ARTIFACT_PATHNAME=dist/${ARTIFACT_NAME}