- macos yml fix for build #21
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
name: linux build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
qt5: | |
name: Qt5 build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate release tag | |
id: tag | |
run: echo "::set-output name=release_date::1.0.$(date +'%m%d%Y')" | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
- name: Install dependencies | |
run: sudo apt-get install alien build-essential fakeroot devscripts | |
- name: Configure build | |
run: qmake big-file-editor.pro | |
- name: Build project | |
run: make -j3 | |
- name: Create deb and rpm | |
run: | | |
NAME=big-file-editor-${{ steps.tag.outputs.release_date }} | |
strip big-file-editor | |
tar -jcvf big-file-editor.linux.bz2 big-file-editor | |
mkdir -p $NAME/DEBIAN | |
cat <<EOT > $NAME/DEBIAN/control | |
Package: big-file-editor | |
Section: editors | |
Depends: qt5-default (>= 5.11) | |
Maintainer: Ozkan Pakdil | |
Version: ${{ steps.tag.outputs.release_date }} | |
License: GPL-3.0 | |
Architecture: amd64 | |
Homepage: https://github.com/ozkanpakdil/big-file-editor | |
Description: Editing large files | |
This program is for opening big files and search/edit inside. | |
EOT | |
mkdir -p $NAME/usr/share/applications/ | |
cat <<EOT > $NAME/usr/share/applications/big-file-editor.desktop | |
[Desktop Entry] | |
Encoding=UTF-8 | |
Exec=/usr/local/bin/big-file-editor | |
Icon=/usr/local/share/big-file-editor/Notepad-icon.png | |
Type=Application | |
Terminal=false | |
Comment=For editing large files | |
Name=Big file editor | |
GenericName=Big file editor | |
StartupNotify=false | |
Categories=Editor; | |
EOT | |
mkdir -p $NAME/usr/local/bin | |
mkdir -p $NAME/usr/local/share/big-file-editor | |
cp big-file-editor $NAME/usr/local/bin | |
cp Notepad-icon.png $NAME/usr/local/share/big-file-editor | |
sudo dpkg-deb --build $NAME | |
rm -rf $NAME | |
sudo alien --nopatch -rk $NAME.deb | |
- name: Release with Notes | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
*.deb | |
*.rpm | |
tag_name: ${{ steps.tag.outputs.release_date }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |