Repository navigation
78 lines (74 loc) · 2.5 KB
/
Copy pathwinget-submit.yml
File metadata and controls
78 lines (74 loc) · 2.5 KB
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
69
70
71
72
73
74
75
76
77
78
name: WinGet manifests
on:
release:
types: [published]
workflow_dispatch:
inputs:
release_tag:
description: Exact published Stable release tag to prepare
required: true
type: string
submit:
description: Request the protected public submission job
required: true
default: false
type: boolean
permissions:
contents: read
jobs:
prepare:
if: >-
${{ github.event_name == 'workflow_dispatch' ||
(github.event_name == 'release' && github.event.release.prerelease == false) }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out Quill
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.13"
- name: Install the release-tag parser dependency
run: python -m pip install packaging
- name: Prepare and validate the local manifest set
env:
QUILL_RELEASE_TAG: ${{ github.event.release.tag_name || inputs.release_tag }}
QUILL_WINGET_OUTPUT: ${{ runner.temp }}/winget-manifests
run: >-
python -m scripts.winget.prepare
--tag "$QUILL_RELEASE_TAG"
--output "$QUILL_WINGET_OUTPUT"
- name: Keep the prepared manifests for review
uses: actions/upload-artifact@v7
with:
name: winget-manifests-${{ github.event.release.tag_name || inputs.release_tag }}
path: ${{ runner.temp }}/winget-manifests/manifests
if-no-files-found: error
submit:
needs: prepare
if: >-
${{ vars.WINGET_SUBMISSION_ENABLED == 'true' &&
((github.event_name == 'release' && github.event.release.prerelease == false) ||
(github.event_name == 'workflow_dispatch' && inputs.submit == true)) }}
runs-on: ubuntu-latest
timeout-minutes: 30
environment:
name: winget-submission
steps:
- name: Check out Quill
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.13"
- name: Install the release-tag parser dependency
run: python -m pip install packaging
- name: Submit one approved package version
env:
QUILL_RELEASE_TAG: ${{ github.event.release.tag_name || inputs.release_tag }}
WINGET_SUBMIT_TOKEN: ${{ secrets.WINGET_SUBMIT_TOKEN }}
run: >-
python -m scripts.winget.submit
--tag "$QUILL_RELEASE_TAG"
--submit