Skip to content

Commit

Permalink
Fixes workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
phkaeser committed Nov 8, 2024
1 parent d5d107b commit 92d050a
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/package-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}

0 comments on commit 92d050a

Please sign in to comment.