-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflows: Move DEB package build script here
Signed-off-by: Rem01Gaming <[email protected]>
- Loading branch information
1 parent
e2a4456
commit c121c37
Showing
2 changed files
with
54 additions
and
70 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,55 @@ | ||
name: Build DEB Package | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/workflows/pack-deb.yml' | ||
- 'src/**' | ||
- 'share/**' | ||
- 'dpkg-conf/**' | ||
- 'Makefile' | ||
|
||
jobs: | ||
build: | ||
name: Build DEB package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: dpkg compile | ||
working-directory: ./ | ||
run: make pack-deb | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: origami-kernel.deb | ||
path: ./ | ||
- name: Upload to telegram | ||
env: | ||
CHAT_ID: ${{ secrets.CHAT_ID }} | ||
BOT_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | ||
COMMIT_URL: ${{ github.event.head_commit.url }} | ||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
TITLE: OKM DEB Package | ||
run: | | ||
DEB="okm-$(git rev-list HEAD --count)-$(git rev-parse --short HEAD)-gh.deb" | ||
mv origami-kernel.deb $DEB | ||
if [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then | ||
export VERSION=$(git rev-list --count HEAD) | ||
bash $GITHUB_WORKSPACE/.github/scripts/telegram_bot.sh $GITHUB_WORKSPACE/$DEB | ||
name: Build DEB Package | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/workflows/pack-deb.yml' | ||
- 'src/**' | ||
- 'share/**' | ||
- 'dpkg-conf/**' | ||
|
||
jobs: | ||
build: | ||
name: Build DEB package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: dpkg compile | ||
working-directory: ./ | ||
run: | | ||
mkdir -pv ./out/deb/data/data/com.termux/files/usr/bin | ||
mkdir -pv ./out/deb/data/data/com.termux/files/usr/share/origami-kernel | ||
cp -rv share/* ./out/deb/data/data/com.termux/files/usr/share/origami-kernel | ||
cp -rv src/* ./out/deb/data/data/com.termux/files/usr/bin | ||
cp -rv dpkg-conf ./out/deb/DEBIAN | ||
sed -i "s/^Version: .*/Version: $(cat share/version)-$(shell git rev-list HEAD --count)+$(shell git rev-parse --short HEAD)/" ./out/deb/DEBIAN/control | ||
chmod -Rv 755 ./out/deb/DEBIAN | ||
chmod -Rv 755 ./out/deb/data/data/com.termux/files/usr/bin | ||
chmod -Rv 777 ./out/deb/data/data/com.termux/files/usr/bin/* | ||
cd ./out/deb && dpkg -b . ../../origami-kernel.deb | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: origami-kernel.deb | ||
path: ./ | ||
- name: Upload to telegram | ||
env: | ||
CHAT_ID: ${{ secrets.CHAT_ID }} | ||
BOT_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | ||
COMMIT_URL: ${{ github.event.head_commit.url }} | ||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
TITLE: OKM DEB Package | ||
run: | | ||
DEB="okm-$(git rev-list HEAD --count)-$(git rev-parse --short HEAD)-gh.deb" | ||
mv origami-kernel.deb $DEB | ||
if [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then | ||
export VERSION=$(git rev-list --count HEAD) | ||
bash $GITHUB_WORKSPACE/.github/scripts/telegram_bot.sh $GITHUB_WORKSPACE/$DEB | ||
fi |
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