|
1 | 1 | # This file is part of BOINC. |
2 | | -# http://boinc.berkeley.edu |
3 | | -# Copyright (C) 2023 University of California |
| 2 | +# https://boinc.berkeley.edu |
| 3 | +# Copyright (C) 2025 University of California |
4 | 4 | # |
5 | 5 | # BOINC is free software; you can redistribute it and/or modify it |
6 | 6 | # under the terms of the GNU Lesser General Public License |
|
18 | 18 | name: Snap |
19 | 19 | on: |
20 | 20 | push: |
21 | | - branches: [ master, 'client_release/**' ] |
| 21 | + branches: [ master ] |
22 | 22 | tags: [ 'client_release/**' ] |
23 | 23 | pull_request: |
24 | 24 | branches: [ master ] |
25 | 25 | schedule: |
26 | | - - cron: '0 0 * * *' |
| 26 | + - cron: '0 0 * * *' |
27 | 27 |
|
28 | 28 | concurrency: |
29 | 29 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
|
64 | 64 | run: | |
65 | 65 | echo "VCPKG_BINARY_SOURCES=clear;x-aws-config,no-sign-request;x-aws,s3://vcpkg.cache.boinc/,read" >> $GITHUB_ENV |
66 | 66 |
|
| 67 | + - name: Fix version in the snapcraft.yaml |
| 68 | + run: | |
| 69 | + PKG_VERSION=$(cat version.h | grep BOINC_VERSION_STRING | sed -e 's|#define BOINC_VERSION_STRING||' | jq -r .) |
| 70 | + if [[ "x${PKG_VERSION}" == "x" ]]; then |
| 71 | + printf "Could not obtain release package version from version.h" |
| 72 | + exit 1 |
| 73 | + fi |
| 74 | + PKG_VERSION_FULL="${PKG_VERSION}-${{ github.run_number }}" |
| 75 | + sed -i -E "s/(version: \"$PKG_VERSION\")/version: \"$PKG_VERSION_FULL\"/" ${{ github.workspace }}/snap/snapcraft.yaml |
| 76 | +
|
67 | 77 | - name: Configure docker qemu |
68 | 78 | if: success() |
69 | 79 | uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25 |
@@ -120,6 +130,24 @@ jobs: |
120 | 130 | name: snap_logs_${{ matrix.type }}_${{ github.event.pull_request.head.sha }} |
121 | 131 | path: deploy/logs.7z |
122 | 132 |
|
| 133 | + - name: Publish nightly snap build to the edge |
| 134 | + if: success() && matrix.type == 'x64' && github.ref == 'refs/heads/master' && github.event_name == 'schedule' |
| 135 | + uses: snapcore/action-publish@214b86e5ca036ead1668c79afb81e550e6c54d40 |
| 136 | + env: |
| 137 | + SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_LOGIN }} |
| 138 | + with: |
| 139 | + snap: ${{ matrix.snap_file }} |
| 140 | + release: edge |
| 141 | + |
| 142 | + - name: Publish alpha snap build to the beta |
| 143 | + if: success() && matrix.type == 'x64' && startsWith(github.ref, 'refs/tags/') |
| 144 | + uses: snapcore/action-publish@214b86e5ca036ead1668c79afb81e550e6c54d40 |
| 145 | + env: |
| 146 | + SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_LOGIN }} |
| 147 | + with: |
| 148 | + snap: ${{ matrix.snap_file }} |
| 149 | + release: beta |
| 150 | + |
123 | 151 | - name: Prepare artifacts for deploy |
124 | 152 | if: success() |
125 | 153 | run: python ./deploy/prepare_deployment.py linux_snap |
|
0 commit comments