Rebuild #4
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: Rebuild | |
on: | |
workflow_dispatch: | |
inputs: | |
tagname: | |
description: tag name (with 'v', v4.6.9.0) | |
type: string | |
required: true | |
pkgrel: | |
description: pkgrel (integer) | |
type: number | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: omanshkrishn/materialgram:latest | |
steps: | |
- name: Update System | |
run: pacman -Syu --noconfirm | |
- name: Build materialgram | |
run: | | |
[ -d "/home/builder" ] && cd /home/builder || { mkdir -p /home/builder && cd /home/builder; } | |
git clone https://github.com/kukuruzka165/materialgram --recursive -b ${{ github.event.inputs.tagname }} && cd materialgram | |
cmake \ | |
-B build \ | |
-G Ninja \ | |
-DCMAKE_INSTALL_PREFIX="/usr" \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DTDESKTOP_API_ID=${{ secrets.API_ID }} \ | |
-DTDESKTOP_API_HASH=${{ secrets.API_HASH }} \ | |
-DDESKTOP_APP_DISABLE_AUTOUPDATE=True \ | |
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON | |
ninja -C build -j$(nproc --all) | |
mkdir fakeroot && DESTDIR=$(pwd)/fakeroot ninja -C build install && cd fakeroot | |
tar -czvf materialgram-${{ github.event.inputs.tagname }}.tar.gz usr | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: materialgram-${{ github.event.inputs.tagname }} | |
path: /home/builder/materialgram/fakeroot/materialgram-${{ github.event.inputs.tagname }}.tar.gz | |
- name: Upload artifact to Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: ${{ github.event.inputs.tagname }} | |
token: ${{ secrets.PAT }} | |
tag_name: ${{ github.event.inputs.tagname }} | |
files: /home/builder/materialgram/fakeroot/materialgram-${{ github.event.inputs.tagname }}.tar.gz | |
trigger-workflow: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Trigger repository dispatch event | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.OKsPAT }} | |
repository: materialgram/materialgram-bin | |
event-type: rebuild | |
client-payload: '{"tagname": "${{ github.event.inputs.tagname }}", "pkgrel": "${{ github.event.inputs.pkgrel }}"}' |