|
| 1 | +# This is a basic workflow to help you get started with Actions |
| 2 | + |
| 3 | +name: OpenHD Image Writer lunar |
| 4 | + |
| 5 | +# Controls when the workflow will run |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - "2.5-evo" |
| 10 | + - "dev-release" |
| 11 | + - "release" |
| 12 | + paths-ignore: |
| 13 | + - '**.md' |
| 14 | + - '**.asciidoc' |
| 15 | + - '**.adoc' |
| 16 | + - '.gitignore' |
| 17 | + - 'LICENSE' |
| 18 | + |
| 19 | +# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
| 20 | +jobs: |
| 21 | + # This workflow contains a single job called "build" |
| 22 | + build: |
| 23 | + # The type of runner that the job will run on |
| 24 | + runs-on: ubuntu-22.04 |
| 25 | + container: |
| 26 | + image: docker://ubuntu:lunar |
| 27 | + |
| 28 | + # Steps represent a sequence of tasks that will be executed as part of the job |
| 29 | + steps: |
| 30 | + - name: initialise |
| 31 | + run: | |
| 32 | + echo "DT=$(date +'%Y-%m-%d_%H%M')" >> $GITHUB_ENV |
| 33 | + echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV |
| 34 | + apt update |
| 35 | + apt install -y git sudo |
| 36 | +
|
| 37 | + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
| 38 | + - uses: actions/checkout@v3 |
| 39 | + |
| 40 | + # Runs a set of commands using the runners shell |
| 41 | + - name: Build |
| 42 | + run: | |
| 43 | + sudo apt update |
| 44 | + sudo apt upgrade -y |
| 45 | + sudo apt install -y --no-install-recommends libgnutls28-dev build-essential devscripts debhelper cmake git libarchive-dev libcurl4-openssl-dev qtbase5-dev qtbase5-dev-tools qtdeclarative5-dev libqt5svg5-dev qttools5-dev libssl-dev qml-module-qtquick2 qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qtquick-templates2 qml-module-qtquick-window2 qml-module-qtgraphicaleffects |
| 46 | + mkdir build |
| 47 | + mv `ls -A | grep -v "build"` build |
| 48 | + cd build |
| 49 | + debuild -uc -us |
| 50 | + cd .. |
| 51 | + |
| 52 | + - name: Upload to Github |
| 53 | + uses: 'actions/upload-artifact@v3' |
| 54 | + with: |
| 55 | + name: "OpenHD Image Writer" |
| 56 | + path: | |
| 57 | + *.deb |
| 58 | + if-no-files-found: error |
| 59 | + |
| 60 | + - name: Push |
| 61 | + id: push |
| 62 | + uses: cloudsmith-io/action@master |
| 63 | + with: |
| 64 | + api-key: ${{ secrets.CLOUDSMITH_API_KEY }} |
| 65 | + command: "push" |
| 66 | + format: "deb" |
| 67 | + owner: "openhd" |
| 68 | + repo: ${{ github.ref_name }} |
| 69 | + distro: "ubuntu" |
| 70 | + release: "lunar" |
| 71 | + republish: "true" # needed ONLY if version is not changing |
| 72 | + file: "*.deb" |
0 commit comments