Skip to content

Commit f570152

Browse files
author
Kareem Zidane
committedJul 29, 2021
Deploy with GitHub Actions
1 parent 6c7815e commit f570152

File tree

4 files changed

+33
-132
lines changed

4 files changed

+33
-132
lines changed
 

‎.github/workflows/main.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
on: push
2+
jobs:
3+
build-and-deploy:
4+
runs-on: ubuntu-latest
5+
steps:
6+
- uses: actions/checkout@v2
7+
- name: Install dependencies
8+
run: |
9+
sudo apt-get install -y rpm
10+
gem install fpm package_cloud
11+
- name: Build
12+
run: |
13+
make deb
14+
make rpm
15+
- name: Deploy
16+
if: ${{ github.ref == 'refs/heads/main' }}
17+
run: |
18+
PACKAGE_CLOUD_USER="cs50"
19+
20+
# Deploy deb to ubuntu repos
21+
UBUNTU_REPOS=( xenial yakkety zesty artful bionic disco eoan focal groovy )
22+
for repo in "${UBUNTU_REPOS[@]}"; do
23+
package_cloud push "$PACKAGE_CLOUD_USER"/ubuntu/"$repo" build/deb/*.deb
24+
done
25+
26+
# Deploy rpm to fedora repos
27+
for repo in $(seq 29 32); do
28+
package_cloud push "$PACKAGE_CLOUD_USER"/fedora/"$repo" build/rpm/*.rpm
29+
done
30+
env:
31+
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.*
2+
!.github
23
!.gitignore
34
!.travis.yml
45
build/

‎.travis.yml

-131
This file was deleted.

‎Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION := 10.1.2
1+
VERSION := 10.1.3
22
MAJOR_VERSION := $(shell echo $(VERSION) | cut -d'.' -f1)
33

44
# installation directory (/usr/local by default)

0 commit comments

Comments
 (0)
Please sign in to comment.