Skip to content

Commit

Permalink
fix workflow issues
Browse files Browse the repository at this point in the history
  • Loading branch information
johnathanchann committed Aug 29, 2024
1 parent 4de79f6 commit 4d020e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/package-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ name: package-release

on:
push:
paths-ignore:
- "README.md"
- "LICENSE"
- "Doxyfile"
- "doxygen-awesome"

pull_request:
branches: 'version-**'
paths-ignore:
- "README.md"
- "LICENSE"
Expand All @@ -35,7 +29,6 @@ jobs:
strategy:
fail-fast: false
matrix:
build-type: [Release]
distro: [stable]
needs: check_commit_message
if: ${{ contains(needs.check_commit_message.outputs.commit_message, 'RELEASE') }}
Expand All @@ -55,7 +48,7 @@ jobs:
id: get_version
shell: bash
run: |
VERSION=$(echo $GITHUB_REF_NAME | cut -d - -f 2)
VERSION=$(echo $GITHUB_REF_NAME | cut -d - -f 2)
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Checking out sources
Expand All @@ -69,7 +62,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DPROJECT_VERSION=${{ steps.get_version.outputs.VERSION }}
cmake .. -GNinja -DPROJECT_VERSION=${{ steps.get_version.outputs.VERSION }}
echo "VERSION=${{ steps.get_version.outputs.VERSION }}"
- name: Build
Expand All @@ -87,7 +80,7 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: mcpp-${{ steps.get_version.outputs.VERSION }}-debian-${{ matrix.distro }}-${{ matrix.build-type }}.deb
name: mcpp-${{ steps.get_version.outputs.VERSION }}-debian-${{ matrix.distro }}.deb
path: build/${{ steps.get_package.outputs.NAME }}

- name: Create tag
Expand All @@ -100,7 +93,7 @@ jobs:
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/${{ steps.get_package.outputs.NAME }}
asset_name: mcpp-${{ steps.get_version.outputs.VERSION }}-debian-${{ matrix.distro }}-${{ matrix.build-type }}.deb
asset_name: mcpp-${{ steps.get_version.outputs.VERSION }}-debian-${{ matrix.distro }}.deb
tag: release-${{ steps.get_version.outputs.VERSION }}
overwrite: true

Expand Down
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
cmake_minimum_required(VERSION 3.16)

# Check if PROJECT_VERSION is already defined, otherwise set a default
if(NOT DEFINED PROJECT_VERSION)
set(PROJECT_VERSION 1.0.0)
endif()

project(mcpp VERSION ${PROJECT_VERSION})

Expand Down

0 comments on commit 4d020e4

Please sign in to comment.