This repository has been archived by the owner on Dec 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (48 loc) · 1.7 KB
/
update.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: "Update gir and all gir-files"
permissions:
contents: write
on:
workflow_dispatch:
schedule:
- cron: "0 1 * * *"
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "true"
- uses: ./.github/actions/install_deps
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt, clippy
## Update the submodules
- name: Update submodules
run: |
git submodule update --remote
## Update the gir submodule and install the new version
- name: Install gir
working-directory: ./gir
run: |
ls
export PATH=$PATH:/github/home/.cargo/bin
cargo install --force --path .
- uses: ./.github/actions/build_test_commit
with:
commit_message: Automatically updated the version of gir
## Check the version of the gtk-layer-shell package
## Aborts if there was a major version bump
- name: Get the first character of the version of the gtk-layer-shell package to detect mayor version bumps
id: major_version_check
run: |
echo "MAJOR_VERSION=$(dpkg -s libgtk-layer-shell-dev | grep Version | sed 's/Version. 0.//' | cut -c1-1)" >> $GITHUB_OUTPUT
echo "Version: ${{ steps.major_version_check.outputs.MAJOR_VERSION }}"
- name: Fail if mayor version was increased
if: steps.major_version_check.outputs.MAJOR_VERSION != '7'
run: exit 1
- uses: ./.github/actions/build_test_commit
with:
commit_message: Automatically updated the version of gtk-layer-shell, the gir files or gir