Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create github actions to test debian packaging #165

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/package_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: package_release

on:
workflow_dispatch:
inputs:
tag_name:
description: Tag Name
required: false
default: unstable

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Get code
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y debhelper pkg-config libcap-dev libpcap-dev libsystemd-dev asciidoc
- name: Build debian package
run: |
make
dpkg-buildpackage -us -uc -tc -b
- name: Place artifacts in a folder
run: |
mkdir artifacts
mv ../isolate_*_amd64.deb artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
./artifacts/*.deb
if-no-files-found: error
retention-days: 1
publish:
needs: [build]
runs-on: ubuntu-24.04
timeout-minutes: 2
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Set tag name
if: github.event_name == 'workflow_dispatch'
run: echo "TAG_NAME=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
- name: Prerelease flag
run: |
PRERELEASE_FLAG=""
case "$TAG_NAME" in
unstable)
echo "Setting prerelease flag"
PRERELEASE_FLAG="--prerelease"
;;
*)
echo "Not setting prerelease flag"
;;
esac
- name: Release
run: |
echo "Publishing to github"
gh release create ${PRERELEASE_FLAG} "$TAG_NAME" || echo "Release creation failed, but continuing..." && true
gh release upload --clobber "$TAG_NAME" artifacts/isolate_*_amd64.deb
26 changes: 26 additions & 0 deletions .github/workflows/package_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: package_test

on:
push:
branches:
- "*"

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Get code
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y debhelper pkg-config libcap-dev libpcap-dev libsystemd-dev asciidoc
- name: Build debian package
run: |
make
dpkg-buildpackage -us -uc -tc -b