chore: clean up CPack config #445
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: All Source Files | |
on: | |
push: | |
release: | |
types: [published, edited] | |
jobs: | |
check_commit_msg: | |
outputs: | |
commit_message: ${{ steps.get_message.outputs.message }} | |
name: Check if the workflow has been disabled. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get commit message | |
id: get_message | |
run: | | |
echo "::set-output name=message::$(git log --format=%B -n 1 ${{ github.event.after }})" | |
linux: | |
needs: check_commit_msg | |
name: All Source Files | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install git | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y git | |
- name: Get the version | |
id: get_version | |
shell: bash | |
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | |
- name: Checking out sources | |
uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- name: Create 7z Release | |
uses: DuckSoft/[email protected] | |
with: | |
pathSource: ./ | |
pathTarget: ./Lemon-${{ steps.get_version.outputs.VERSION }}-source-all.7z | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Lemon-${{ steps.get_version.outputs.VERSION }}-source-all.7z | |
path: Lemon-${{ steps.get_version.outputs.VERSION }}-source-all.7z | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v1-release | |
if: startsWith(github.event.ref, 'refs/tags/') | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: Lemon-${{ steps.get_version.outputs.VERSION }}-source-all.7z | |
asset_name: Lemon-${{ steps.get_version.outputs.VERSION }}-source-all.7z | |
tag: ${{ github.ref }} | |
overwrite: true |