From 92d050a60a14629daec156b1e7e3765cf6226228 Mon Sep 17 00:00:00 2001 From: Philipp Kaeser Date: Fri, 8 Nov 2024 16:53:41 +0100 Subject: [PATCH] Fixes workflow. --- .github/workflows/package-release.yml | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml index 2eecb33b..576cb97c 100644 --- a/.github/workflows/package-release.yml +++ b/.github/workflows/package-release.yml @@ -27,29 +27,19 @@ jobs: # dependencies/. These are only needed to build wlroots from source. submodules: true - - name: Setup environment. - run: | - # ${{ github.ref }} - - echo "We have ${GITHUB_REF}" - echo "And ${GITHUB_REF#refs/tags/}" - tag_or_branch="${GITHUB_REF#refs/tags/}" - tag_or_branch="${tag_or_branch#refs/heads/}" - echo "WLM_RELEASE_NAME=wlmaker-$(echo $tag_or_branch | sed "s/^v//")" >> "$GITHUB_ENV" - echo "WLM_RELEASE_FILE=wlmaker-$(echo $tag_or_branch | sed "s/^v//").tar.gz" >> "$GITHUB_ENV" - - name: Create source package. run: | - echo "${{ github.ref }}" | sed "s/^refs\/tags\/v//" + export WLM_VERSION="$(echo "${{ github.ref }}" | sed "s/^refs\/tags\/v//")" # Setup folder with package name, for apprropriate unpacking. - rm -rf "/tmp/${WLM_RELEASE_NAME}" - cp -a "${PWD}" "/tmp/${WLM_RELEASE_NAME}" - mv "/tmp/${WLM_RELEASE_NAME}" . - tar -zcvf "${WLM_RELEASE_FILE}" "${WLM_RELEASE_NAME}" - echo "Created source archive ${WLM_RELEASE_FILE}." + rm -rf "/tmp/wlmaker-${WLM_VERSION}" + cp -a "${PWD}" "/tmp/wlmaker-${WLM_VERSION}" + mv "/tmp/wlmaker-${WLM_VERSION}" . + tar -zcvf "wlmaker-${WLM_VERSION}.tar.gz" "wlmaker-${WLM_VERSION}" + echo "WLM_ARCHIVE=wlmaker-${WLM_VERSION}.tar.gz" >> "${GITHUB_ENV}@ + echo "Created source archive wlmaker-${WLM_VERSION}.tar.gz." - name: Upload source package. uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: - files: ${{env.WLM_RELEASE_FILE}} + files: ${{env.WLM_ARCHIVE}}