Skip to content

Update deploy_release.yaml #10

Update deploy_release.yaml

Update deploy_release.yaml #10

name: release deployment

Check failure on line 1 in .github/workflows/deploy_release.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy_release.yaml

Invalid workflow file

(Line: 10, Col: 12): Unexpected symbol: '1:'. Located at position 98 within expression: github.ref_name && startsWith(github.ref_name, 'v') && github.ref_name != 'v' && github.ref_name[1:] || github.ref_name
on:
push:
tags:
- "*"
env:
# remove leading v if present in tag name
VERSION: ${{ github.ref_name && startsWith(github.ref_name, 'v') && github.ref_name != 'v' && github.ref_name[1:] || github.ref_name }}
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 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
build_and_distropack:
name: build release + distropack upload
runs-on: ubuntu-24.04
needs:
- check_and_format
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update
- run: sudo apt-get install -y pkg-config libglib2.0-dev libgtk-4-dev libwebkit2gtk-4.1-dev libjavascriptcoregtk-4.1-dev libsoup-3.0-dev libadwaita-1-dev
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: build power-daemon-mgr (release)
run: cargo build --release -p power-daemon-mgr
- name: build frontend-gtk (release)
run: cargo build --release -p frontend-gtk
- name: upload power-daemon-mgr binary
uses: distropack/[email protected]
with:
api-token: ${{ secrets.DISTROPACK_API_TOKEN }}
package-id: f6fee267-5e8e-4fe1-b4b1-f724736d598d
version: ${{ env.VERSION }}
files: |
{
"power-daemon-mgr": "target/release/power-daemon-mgr"
}
- name: upload frontend-gtk binary
uses: distropack/[email protected]
with:
api-token: ${{ secrets.DISTROPACK_API_TOKEN }}
package-id: 9668ac33-5166-4952-a364-24d3dbc5abeb
version: ${{ env.VERSION }}
files: |
{
"power-options-gtk": "target/release/frontend-gtk"
}
publish_aur_packages:
name: publish aur packages
runs-on: ubuntu-latest
needs:
- check_and_format
steps:
- uses: actions/checkout@v4
with:
# fetch entire history for proper aur versioning
fetch-depth: 0
- name: generate pkgbuilds
run: |
python ./ci/gen_daemon_pkgbuild.py
python ./ci/gen_gtk_pkgbuild.py
python ./ci/gen_webview_pkgbuild.py
python ./ci/gen_tray_pkgbuild.py
- name: publish power-options-daemon to the aur
uses: KSXGitHub/[email protected]
with:
pkgname: power-options-daemon
pkgbuild: ./pkgbuilds/daemon/PKGBUILD
assets: ./pkgbuilds/daemon/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 release"
force_push: "true"
- name: publish power-options-gtk to the aur
uses: KSXGitHub/[email protected]
with:
pkgname: power-options-gtk
pkgbuild: ./pkgbuilds/gtk/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"
- name: publish power-options-webview to the aur
uses: KSXGitHub/[email protected]
with:
pkgname: power-options-webview
pkgbuild: ./pkgbuilds/webview/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"
- name: publish power-options-tray to the aur
uses: KSXGitHub/[email protected]
with:
pkgname: power-options-tray
pkgbuild: ./pkgbuilds/tray/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"