Skip to content

Commit 2a5e0b6

Browse files
committed
add deploy script
Let's add a manual step to deploy to packagecloud. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
1 parent 787c614 commit 2a5e0b6

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#############################################################################
2+
# #
3+
# Packagecloud deployment via GH actions for LibTomMath #
4+
# (https://github.com/libtom/libtommath.git) #
5+
# #
6+
#############################################################################
7+
8+
name: Deploy
9+
10+
on:
11+
workflow_dispatch
12+
13+
jobs:
14+
deploy-to-packagecloud:
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ ubuntu-20.04, ubuntu-22.04 ]
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: set Ubuntu codename
22+
run: |
23+
echo "ubuntu_codename="$(lsb_release -sc) >> "$GITHUB_ENV"
24+
- name: install dependencies
25+
run: |
26+
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
27+
echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ ${{ env.ubuntu_codename }} main" | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
28+
sudo apt-get update -qq
29+
sudo apt-get install -y cmake gcc
30+
- name: build static
31+
run: |
32+
mkdir -p build
33+
cd build
34+
cmake -DBUILD_SHARED_LIBS=Off -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
35+
make -j$(nproc)
36+
cpack -G DEB
37+
cmake -DBUILD_SHARED_LIBS=On -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
38+
make -j$(nproc)
39+
cpack -G DEB
40+
- name: push package to packagecloud.io
41+
uses: computology/packagecloud-github-action@v0.6
42+
with:
43+
PACKAGE-NAME: packages/ubuntu/${{ env.ubuntu_codename }}/*.deb
44+
PACKAGECLOUD-USERNAME: libtom
45+
PACKAGECLOUD-REPONAME: libtom
46+
PACKAGECLOUD-DISTRO: ubuntu/${{ env.ubuntu_codename }}
47+
PACKAGECLOUD-TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}

0 commit comments

Comments
 (0)