Skip to content

Commit ee46112

Browse files
committed
Require Canonical review evidence before exporting or publishing Snap
1 parent 7441813 commit ee46112

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎.github/workflows/snap-publish.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
build_run_id:
88
description: Successful snap-strict build run to publish
99
required: true
10-
default: '39972678135'
1110
publish_to_store:
1211
description: Upload and release to Snap Store latest/stable
1312
type: boolean
@@ -21,7 +20,7 @@ jobs:
2120
timeout-minutes: 20
2221
env:
2322
GH_TOKEN: ${{ github.token }}
24-
BUILD_RUN_ID: ${{ inputs.build_run_id || '39972678135' }}
23+
BUILD_RUN_ID: ${{ inputs.build_run_id }}
2524
steps:
2625
- name: Require successful strict build
2726
id: source
@@ -57,6 +56,8 @@ jobs:
5756
assert metadata['confinement'] == 'strict'
5857
version = str(metadata['version'])
5958
assert re.fullmatch(r'[0-9]+\.[0-9]+\.[0-9]+', version)
59+
reviews = list(pathlib.Path('package').rglob('snap-review.json'))
60+
assert len(reviews) == 1 and reviews[0].stat().st_size > 0, 'Missing Canonical Store review evidence'
6061
evidence = list(pathlib.Path('package').rglob('gui-smoke.json'))
6162
assert len(evidence) == 1 and json.loads(evidence[0].read_text())['status'] == 'PASS'
6263
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:

0 commit comments

Comments
 (0)