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

merge buildman scripts, automate deploy and release #130

Merged
merged 31 commits into from
May 1, 2020
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
35036b8
add OpenBangla/buildman (commit:a81fbcd6728647cd3e49b4475ab770a1a7e4e…
Feb 15, 2020
1c76e31
integrate buildman workflows
Feb 15, 2020
4f093fb
update build process
Feb 15, 2020
37ddc90
get build version from cmake config
Feb 15, 2020
0a97ad0
update buildman readme
Feb 15, 2020
d93040f
keep version info centrally in version.txt
Feb 16, 2020
1d8b62c
skip ci on non-essential file change
Feb 16, 2020
fa01c82
removed unnecessary condition from workflow
Feb 16, 2020
b1b64e7
implement github release generation
Feb 16, 2020
180886a
workflow name: build -> deploy. update buildman readme
Feb 16, 2020
096b09e
skip running workflows on tag push
Feb 16, 2020
da7341f
update install instructions with repo config.
Feb 16, 2020
ec1db32
add branch filter to PR ci
Feb 17, 2020
304390d
simplify ubuntu/debian install cmd + fix target paths
Feb 17, 2020
3552296
add back a missing cmd
Feb 17, 2020
322cbbd
support minor ubuntu versions
Feb 17, 2020
6672a07
get bintray username from secrets
Feb 17, 2020
93d3293
checking $DEPLOY not needed now in deploy workflow
Feb 17, 2020
28b9a92
drop ubuntu 17 (unmaint'd)
Feb 17, 2020
fbae457
don't overwrite dist deploys
Feb 17, 2020
cb94567
drop ubuntu16. readme typo fix
Feb 17, 2020
7630593
fix ubuntu deployment
Feb 17, 2020
8dcf823
Merge branch 'master' into gh-release
Mar 25, 2020
bee52a6
fix typo in readme cmd
Apr 13, 2020
17bed9b
Merge branch 'master' of github.com:OpenBangla/OpenBangla-Keyboard in…
Apr 26, 2020
f24629e
revert readme
Apr 26, 2020
09b19f1
uploads separate installers to release
Apr 26, 2020
f8298e5
added deployment distro units note
Apr 26, 2020
cdf41bb
fixed typo in tools/publish.sh
Apr 26, 2020
428a844
add archlinux packager metadata, update pkg fmt
May 1, 2020
e498296
package metadata consistency
May 1, 2020
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
19 changes: 14 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
name: CI
on: [push, pull_request]
on:
push:
branches: [ '**' ]
tags-ignore: [ '**' ]
paths-ignore: [ '**.md', '**.adoc' ]
pull_request:
paths-ignore: [ '**.md', '**.adoc' ]

jobs:
build:
runs-on: [ "ubuntu-latest" ]
if: contains(github.event.head_commit.message, 'deploy+') == false
runs-on: "ubuntu-latest"
strategy:
matrix:
env:
- { CXX: g++, CC: gcc, CXX_FOR_BUILD: g++, CC_FOR_BUILD: gcc }
- { CXX: clang++, CC: clang, CXX_FOR_BUILD: clang++, CC_FOR_BUILD: clang }
steps:
- name: checkout-source
uses: actions/checkout@v2
- name: checkout-submodules
run: git submodule update --init --recursive
uses: actions/checkout@v1
with:
submodules: recursive
- name: update-system
run: sudo apt-get update -qq
- name: install-deps
Expand All @@ -24,3 +32,4 @@ jobs:
cd build
cmake ..
make

106 changes: 106 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: DEPLOY

on:
push:
branches: [ '**' ]
tags-ignore: [ '**' ]

jobs:

build:
if: contains(github.event.head_commit.message, 'deploy+')
strategy:
matrix:
container: [ "ubuntu:16.04", "ubuntu:18.04", "ubuntu:19.04", "ubuntu:20.04", "debian:9", "debian:10", "fedora:29", "fedora:30", "fedora:31", "archlinux:latest" ]
runs-on: "ubuntu-latest"
container:
image: ${{ matrix.container }}
env:
DIST: ${{ matrix.container }}
env:
DEPLOY: ${{ true }}
steps:
- name: checkout-source
uses: actions/checkout@v1
with:
submodules: recursive
- name: run-builder
shell: bash
run: ./tools/build.sh
- name: upload-artifacts
uses: actions/upload-artifact@v1
with:
name: package-archives
path: artifact

deploy:
needs: build
runs-on: "ubuntu-latest"
container:
image: "archlinux:latest"
env:
BINTRAY_USER: ${{ github.actor }}
BINTRAY_APIKEY: ${{ secrets.BINTRAY_APIKEY }}
BINTRAY_GPG_DATA: ${{ secrets.GPG_DATA }}
BINTRAY_GPG_ID: ${{ secrets.GPG_ID }}
JFROG_CLI_OFFER_CONFIG: false
steps:
- name: checkout-source
uses: actions/checkout@v1
with:
submodules: recursive
- name: install-jfrog-cli
uses: jfrog/setup-jfrog-cli@v1
- name: download-artifacts
uses: actions/download-artifact@v1
with:
name: package-archives
path: artifact
- name: bintray-publish
shell: bash
run: ./tools/publish.sh

release:
needs: deploy
runs-on: "ubuntu-latest"
steps:
- name: checkout-source
uses: actions/checkout@v1
- name: get-version
id: get_version
shell: bash
run: |
RELEASE_VERSION=$(cat version.txt | head -n1)
echo ::set-output name=RELEASE_VERSION::$RELEASE_VERSION
- name: download-artifacts
uses: actions/download-artifact@v1
with:
name: package-archives
path: artifact
- name: create-release-bundle
shell: bash
run: |
zip -j9 installers.zip artifact/*
- name: create-release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
bdeshi marked this conversation as resolved.
Show resolved Hide resolved
with:
tag_name: ${{ steps.get_version.outputs.RELEASE_VERSION }}
release_name: ${{ steps.get_version.outputs.RELEASE_VERSION }}
body: |
[![Github Releases (by Release)](https://img.shields.io/github/downloads/${{ github.repository }}/${{ steps.get_version.outputs.RELEASE_VERSION }}/total.svg)]()
### Changes in this release:
- ...
draft: false
- name: upload-release-asset
id: upload_release_asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: installers.zip
mominul marked this conversation as resolved.
Show resolved Hide resolved
asset_name: installers.zip
asset_content_type: application/zip
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.0.2)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

project(OpenBangla-Keyboard VERSION 1.5.1)
file(STRINGS "${CMAKE_SOURCE_DIR}/version.txt" VERSION_STRING LIMIT_COUNT 1 REGEX "^.+")
project("OpenBangla-Keyboard" VERSION ${VERSION_STRING})
set(APP_NAME "OpenBangla-Keyboard")

## Set versions
Expand Down
54 changes: 48 additions & 6 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,58 @@ toc::[]

== Installation

WARNING: If you had installed OpenBangla Keyboard 1.2.0 or earlier version, please uninstall it first.
IMPORTANT: If you had installed OpenBangla Keyboard 1.2.0 or earlier version, please uninstall it first.

Make sure you have a **working internet connection**.
First set up our repositories for your distro, then you can install normally with your package manager.

Open your terminal and run this command on your shell:
```bash
wget -nv -O- https://bit.ly/OBK-sh | bash
=== Ubuntu & derivatives
Run these commands to set up our repository:
```
DIST=YOUR_DISTNAME
curl https://dl.bintray.com/openbangla/i/pub.key | sudo apt-key add -
curl https://dl.bintray.com/openbangla/i/ubuntu.conf | sed "s/@NAME@/$DIST/" | sudo tee /etc/sources.list.d/openbangla.list
sudo apt-get update
```
WARNING: Replace `YOUR_DISTNAME` with your distro's _base ubuntu codename_, eg: `bionic`, `focal`, etc.

=== Debian
Run these commands to set up our repository:
```
DIST=YOUR_DISTNAME
curl https://dl.bintray.com/openbangla/i/pub.key | sudo apt-key add -
curl https://dl.bintray.com/openbangla/i/debian.conf | sed "s/@NAME@/$DIST/" | sudo tee /etc/sources.list.d/openbangla.list
sudo apt-get update
```
WARNING: Replace `YOUR_DISTNAME` with your distro's _codename_, eg: `stretch`, `buster`, etc.

=== Fedora
Run these commands to set up our repository:
```
sudp rpm --import https://dl.bintray.com/openbangla/i/pub.key
curl https://dl.bintray.com/openbangla/i/fedora.conf | sudo tee /etc/yum.repos.d/openbangla.repo
```

Then use iBus UI or run `ibus-setup` to add and activate **OpenBangla Keyboard** as input method.
=== Archlinux
Run these commands to set up our repository:

```
sudo pacman-key -r 0x00F3092A45393EC8
sudo pacman-key -lsign-key 0x00F3092A45393EC8
curl https://dl.bintray.com/i/archlinux.conf | sudo tee -a /etc/pacman.conf
sudo pacman -Syy
```

=== Finally
Done! Now you can use your package manager normally to get OpenBangla-Keyboard!
```
sudo apt-get install openbangla-keyboard
sudo dnf install openbangla-keyboard
sudo pacman -S openbangla-keyboard
```

You can also install by downloading necessary packages from our (https://github.com/OpenBangla/OpenBangla-Keyboard/releases)[Release] page

After installation, use iBus UI or run `ibus-setup` to add and activate **OpenBangla Keyboard** as input method.

After you have installed OpenBangla Keyboard, you may need to https://github.com/OpenBangla/OpenBangla-Keyboard/wiki/Configuring-Environment[configure your desktop environment].

Expand Down
55 changes: 48 additions & 7 deletions README.bn.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,59 @@ toc::[]
** চন্দ্রবিন্দুর অবস্থান সংশোধন।


== ইনস্টল
== ইনস্টল পদ্ধতি

WARNING: ওপেনবাংলা কিবোর্ড ১.২.০ অথবা পূর্ববর্তী সংস্করণ ইনস্টল করা থাকলে সেটি প্রথমে আনইনস্টল করে নিন।
IMPORTANT: ওপেনবাংলা কিবোর্ড ১.২.০ অথবা পূর্ববর্তী সংস্করণ ইনস্টল করা থাকলে সেটি প্রথমে আনইনস্টল করে নিন।

ইনস্টলের সময় **কার্যকর ইন্টারনেট সংযোগ** প্রয়োজন
প্রথমে আপনার ডিস্ট্রোর জন্য আমাদের রিপজিটরি যোগ করুন, তারপর আপনার প্যাকেজ ম্যানেজার দিয়ে স্বাভাবিকভাবে ইনস্টল করতে পারবেন

ওপেনবাংলা কিবোর্ড ইন্সটল করার জন্য টার্মিনাল উইন্ডো খুলে এই কমান্ডটি রান করুন:
```bash
wget -nv -O- https://bit.ly/OBK-sh | bash
=== উবুন্টু এবং উবুন্টু-ভিত্তিক ডিস্ট্রো
নিচের কমান্ডগুলো দিয়ে আমাদের রিপজিটরি যোগ করে নিন:
```
DIST=YOUR_DISTNAME
curl https://dl.bintray.com/openbangla/i/pub.key | sudo apt-key add -
curl https://dl.bintray.com/openbangla/i/ubuntu.conf | sed "s/@NAME@/$DIST/" | sudo tee /etc/sources.list.d/openbangla.list
sudo apt-get update
```
WARNING: এখানে `YOUR_DISTNAME` এর জায়গায় আপনার ডিস্ট্রোর _বেজ উবুন্টু কোডনেম_ বসাতে হবে, যেমন: `bionic`, `focal`, ইত্যাদি।
bdeshi marked this conversation as resolved.
Show resolved Hide resolved

=== ডেবিয়ান
নিচের কমান্ডগুলো দিয়ে আমাদের রিপজিটরি যোগ করে নিন:
```
DIST=YOUR_DISTNAME
curl https://dl.bintray.com/openbangla/i/pub.key | sudo apt-key add -
curl https://dl.bintray.com/openbangla/i/debian.conf | sed "s/@NAME@/$DIST/" | sudo tee /etc/sources.list.d/openbangla.list
sudo apt-get update
```
WARNING: এখানে `YOUR_DISTNAME` এর জায়গায় আপনার ডিস্ট্রোর _কোডনেম_ বসাতে হবে, যেমন: `stretch`, `buster`, ইত্যাদি।

=== ফেদোরা
নিচের কমান্ডগুলো দিয়ে আমাদের রিপজিটরি যোগ করে নিন:
```
sudp rpm --import https://dl.bintray.com/openbangla/i/pub.key
curl https://dl.bintray.com/openbangla/i/fedora.conf | sudo tee /etc/yum.repos.d/openbangla.repo
```

এরপর আইবাসের উইন্ডো থেকে অথবা `ibus-setup` কমান্ডের মাধ্যমে **OpenBangla Keyboard** ইনপুট পদ্ধতি হিসেবে যোগ করে নিন।
=== আর্চলিনাক্স
নিচের কমান্ডগুলো দিয়ে আমাদের রিপজিটরি যোগ করে নিন:
```
sudo pacman-key -r 0x00F3092A45393EC8
sudo pacman-key -lsign-key 0x00F3092A45393EC8
curl https://dl.bintray.com/i/archlinux.conf | sudo tee -a /etc/pacman.conf
sudo pacman -Syy
```

=== শেষ ধাপ
ব্যাস! এখন আপনার সিস্টেমের প্যাকেজ ম্যানেজার দিয়ে স্বাভাবিকভাবেই ওপেনবাংলা কিবোর্ড ইনস্টল করতে পারবেন!
```
sudo apt-get install openbangla-keyboard
sudo dnf install openbangla-keyboard
sudo pacman -S openbangla-keyboard
```

এছাড়া আমাদের (https://github.com/OpenBangla/OpenBangla-Keyboard/releases)[রিলিজ] পাতা থেকে উপযুক্ত প্যাকেজ ডাউনলোড করেও ইনস্টল করতে পারেন।

ইন্সটলের পরে আইবাসের উইন্ডো থেকে অথবা `ibus-setup` কমান্ডের মাধ্যমে **OpenBangla Keyboard** ইনপুট পদ্ধতি হিসেবে যোগ করে নিন।

ওপেনবাংলা কিবোর্ড ইনস্টলের পর আপনার https://github.com/OpenBangla/OpenBangla-Keyboard/wiki/Configuring-Environment[ডেস্কটপ এনভায়রনমেন্ট কনফিগার] করার প্রয়োজন হতে পারে।

Expand Down
21 changes: 21 additions & 0 deletions tools/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 OpenBangla

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
20 changes: 20 additions & 0 deletions tools/PKGBUILD.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Maintainer: OpenBangla <openbanglateam@gmail.com>
# THIS IS A *PARTIAL* PKGBUILD TEMPLATE FOR CUSTOM AUTOBUILD PROCESS ONLY
pkgname="openbangla-keyboard"
pkgrel=1
pkgdesc="An OpenSource, Unicode compliant Bengali Input Method"
arch=('x86_64')
url="https://openbangla.github.io"
license=('GPL3')
depends=('ibus' 'qt5-base')
build() {
cd "$srcdir"
mkdir build && cd build
cmake ..
make
}
package() {
cd "$srcdir"
make -C build DESTDIR="$pkgdir" install
}

7 changes: 7 additions & 0 deletions tools/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# buildman

Builds OpenBangla Keyboard packages for various distributions.

- A lightweight C/I workflow runs by default on each commit.
- if commit message has the string `deploy+`, then a deploy workflow runs instead of the default one.
- if build passes, this workflow will deploy packages to repositories, and create a github release.
Loading