File: opensuse.yml

package info (click to toggle)
cozy 1.3.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,144 kB
  • sloc: python: 8,014; xml: 392; makefile: 2
file content (68 lines) | stat: -rw-r--r-- 1,948 bytes parent folder | download | duplicates (2)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Deploy on OBS (OpenSuse)

on:
  release:
    types: [published]
    
#on:
#  watch:
#    types: [started]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4

    - name: Install dependencies
      run: |
        mkdir -p ~/.config/osc
        sudo apt-get update
        sudo apt-get install libnode-dev node-gyp libssl-dev
        sudo apt-get install osc npm python3-m2crypto
        sudo npm install -g json

    - name: Setup osc login
      run: |
        cat >~/.config/osc/oscrc <<EOL
        ${{ secrets.OSCRC }}
        EOL

    - name: Clone cozy repo
      run: osc co X11:Pantheon:Apps/cozy

    - name: Download latest version of cozy
      run: |
        curl -s https://api.github.com/repos/geigi/cozy/releases/latest | json tag_name > /tmp/VERSION
        curl -s https://api.github.com/repos/geigi/cozy/releases/latest | json body > /tmp/CHANGES
        echo https://github.com/geigi/cozy/archive/$(cat /tmp/VERSION).tar.gz > /tmp/RELEASE_URL
        cd X11:Pantheon:Apps/cozy
        rm cozy-*.tar.gz
        wget -O cozy-$(cat /tmp/VERSION).tar.gz $(cat /tmp/RELEASE_URL)

    - name: Update rpm info files
      run: |
        cd X11:Pantheon:Apps/cozy
        sed -i -e 's/- /  * /g' /tmp/CHANGES
        sed -i "1s/^/Update to $(cat /tmp/VERSION)\n/" /tmp/CHANGES
        osc vc -m "$(cat /tmp/CHANGES)"
        sed -i -e "s/Version:.*/Version:        $(cat /tmp/VERSION)/g" cozy.spec

    - name: Osc check-in
      run: |
        cd X11:Pantheon:Apps/cozy
        osc addremove
        osc ci --noservice -m "Update to version $(cat /tmp/VERSION)."

    - name: Wait for obs build to complete
      run: |
        chmod +x $GITHUB_WORKSPACE/.ci/*.sh
        cd X11:Pantheon:Apps/cozy
        $GITHUB_WORKSPACE/.ci/obs_wait_for_build.sh

    - name: Submit package
      run: |
        cd X11:Pantheon:Apps/cozy
        osc submitrequest -m "Update to version $(cat /tmp/VERSION)."