forked from jezhiggins/arabica
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from richardmarston/github-build-action
Build RPM and DEB packages in github CI
- Loading branch information
Showing
5 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
name: Docker Image CI | ||
description: 'Create package' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: package build workflow | ||
# https://www.patriksvensson.se/2020/03/creating-release-artifacts-with-github-actions/ | ||
# https://github.community/t5/GitHub-Actions/Using-on-push-tags-ignore-and-paths-ignore-together/td-p/38559 | ||
# https://github.com/softprops/action-gh-release | ||
# https://github.com/actions/download-artifact | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'release/v*' | ||
|
||
jobs: | ||
package: | ||
runs-on: ubuntu-latest | ||
name: A job to build the packages | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Build | ||
id: build-it-now | ||
uses: ./ | ||
- name: UploadRPM | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: rpm | ||
path: ${{ github.workspace }}/build/*.rpm | ||
- name: UploadDEB | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: deb | ||
path: ${{ github.workspace }}/build/*.deb | ||
release: | ||
needs: package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: GetArtifact | ||
uses: actions/download-artifact@v2 | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
rpm/* | ||
deb/* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
from alpine:latest | ||
|
||
run apk update | ||
run apk add boost-dev g++ make | ||
run apk add cmake expat-dev rpm | ||
copy entrypoint.sh entrypoint.sh | ||
|
||
entrypoint [ "./entrypoint.sh" ] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
cd /github/workspace | ||
mkdir build | ||
cd build | ||
cmake -DBUILD_SHARED_LIBS=ON .. | ||
cpack |