v5.0.2.1 #39
Workflow file for this run
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 | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: omanshkrishn/materialgram:latest | |
steps: | |
- name: Update System | |
run: pacman -Syu --noconfirm | |
- name: Set Tag Name | |
run: echo "TAGNAME=$(echo ${{ github.ref }} | cut -d '/' -f3)" >> $GITHUB_ENV | |
- 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 ${{ env.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-${{ env.TAGNAME }}.tar.gz usr | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: materialgram-${{ env.TAGNAME }} | |
path: /home/builder/materialgram/fakeroot/materialgram-${{ env.TAGNAME }}.tar.gz | |
- name: Upload artifact to Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
name: ${{ env.TAGNAME }} | |
token: ${{ secrets.PAT }} | |
files: /home/builder/materialgram/fakeroot/materialgram-${{ env.TAGNAME }}.tar.gz | |
trigger-workflow: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Set Tag Name | |
run: echo "TAGNAME=$(echo ${{ github.ref }} | cut -d '/' -f3)" >> $GITHUB_ENV | |
- name: Trigger repository dispatch event | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.OKsPAT }} | |
repository: materialgram/materialgram-bin | |
event-type: new-release | |
client-payload: '{"tagname": "${{ env.TAGNAME }}", "pkgrel": "1"}' | |