Skip to content

Convert docs page into github workflow #172

Convert docs page into github workflow

Convert docs page into github workflow #172

name: Commit Deployment
on:
push:
branches:
main
tags:
"*"
jobs:
check_and_format:
name: cargo check and clippy
runs-on: ubuntu-24.04
steps:
- run: sudo apt-get update
- run: sudo apt-get install -y pkg-config libglib2.0-dev libgtk-4-dev libgtk-3-dev libwebkit2gtk-4.1-dev libjavascriptcoregtk-4.1-dev libsoup-3.0-dev libadwaita-1-dev
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy
- run: cargo check
- run: cargo clippy
publish_aur_packages:
name: Publish AUR packages
runs-on: ubuntu-latest
needs:
- check_and_format
steps:
- uses: actions/checkout@v4
with:
# Fetches entire history, this is necessary to properly generate
# version in aur
fetch-depth: 0
- name: Generate PKGBUILDs
run: |
python ./ci/gen_daemon_pkgbuild_git.py
python ./ci/gen_gtk_pkgbuild_git.py
python ./ci/gen_webview_pkgbuild_git.py
python ./ci/gen_tray_pkgbuild_git.py
- name: Publish power-options-daemon-git to the AUR
uses: KSXGitHub/[email protected]
with:
pkgname: power-options-daemon-git
pkgbuild: ./pkgbuilds/daemon-git/PKGBUILD
assets: ./pkgbuilds/daemon-git/daemon.install
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: "Automated update on GitHub commit"
force_push: 'true'
- name: Publish power-options-gtk-git to the AUR
uses: KSXGitHub/[email protected]
with:
pkgname: power-options-gtk-git
pkgbuild: ./pkgbuilds/gtk-git/PKGBUILD
updpkgsums: true
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: "Automated update on GitHub commit"
force_push: 'true'
- name: Publish power-options-webview-git to the AUR
uses: KSXGitHub/[email protected]
with:
pkgname: power-options-webview-git
pkgbuild: ./pkgbuilds/webview-git/PKGBUILD
updpkgsums: true
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: "Automated update on GitHub commit"
force_push: 'true'
- name: Publish power-options-tray-git to the AUR
uses: KSXGitHub/[email protected]
with:
pkgname: power-options-tray-git
pkgbuild: ./pkgbuilds/tray-git/PKGBUILD
updpkgsums: true
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: "Automated update on GitHub release"
force_push: 'true'