Fixes workflow. #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create source package for release | |
on: | |
push: | |
branches: | |
- package-release | |
- main | |
tags: | |
- v* | |
release: | |
types: | |
- published | |
jobs: | |
release: | |
name: Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code, including required submodules. | |
uses: actions/checkout@v3 | |
with: | |
# Not using 'recursive' prevents fetching extra submodules below | |
# dependencies/. These are only needed to build wlroots from source. | |
submodules: true | |
- name: Setup environment. | |
run: | | |
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: | | |
# 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}." | |
- name: Upload source package. | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ${{env.WLM_RELEASE_FILE}} |