Skip to content

Commit

Permalink
Add job to create .deb packages on new releases (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored May 24, 2022
1 parent 71d5c78 commit d5b84db
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: C++ CI Workflow with apt dependencies for release

on:
push:
branches:
- master
pull_request:
release:
types: [published]
schedule:
# * is a special character in YAML so you have to quote this string
# Execute a "nightly" build at 2 AM UTC
- cron: '0 2 * * *'

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
build_type: [Release]
os: [ubuntu-20.04]
fail-fast: false

steps:
- uses: actions/checkout@v2

- name: Dependencies
run: |
sudo apt-get install cmake build-essential rename
- name: Create packages
run: |
mkdir -p build
cd build
cmake -DYCM_MAINTAINER_MODE:BOOL=ON -DCPACK_BINARY_DEB:BOOL=ON -DCPACK_DEBIAN_PACKAGE_DEPENDS="cmake" \
-DCPACK_DEBIAN_PACKAGE_NAME="ycm-cmake-modules" -DCPACK_DEBIAN_PACKAGE_MAINTAINER="Silvio Traversaro" ..
make
make package
rename 's/YCM/ycm-cmake-modules/' YCM-*-all.deb
export YCM_VERSION=`ls ycm-cmake-modules-*-all.deb | cut -d - -f 4`
echo "YCM_VERSION=$YCM_VERSION" >> ${GITHUB_ENV}
- name: Upload .deb package
if: github.event_name == 'release'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: build/ycm-cmake-modules-${{ env.YCM_VERSION }}-all.deb
asset_name: ycm-cmake-modules-${{ env.YCM_VERSION }}-all.deb
asset_content_type: application/octet-stream
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased Patch]

## [0.14.1] - 2022-05-24

### Added
* For each new release now `.deb` packages are automatically uploaded in the GitHub release page (https://github.com/robotology/ycm/pull/410).

## [0.14.0] - 2022-04-20

### Added
Expand Down
2 changes: 1 addition & 1 deletion internal-modules/YCMVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ include(GitInfo)

set(YCM_VERSION_MAJOR 0)
set(YCM_VERSION_MINOR 14)
set(YCM_VERSION_PATCH 0)
set(YCM_VERSION_PATCH 1)

set(YCM_VERSION_API "${YCM_VERSION_MAJOR}.${YCM_VERSION_MINOR}")
set(YCM_VERSION_SHORT "${YCM_VERSION_MAJOR}.${YCM_VERSION_MINOR}.${YCM_VERSION_PATCH}")
Expand Down

0 comments on commit d5b84db

Please sign in to comment.