-
Notifications
You must be signed in to change notification settings - Fork 249
52 lines (45 loc) · 1.66 KB
/
winget_stable.yml
File metadata and controls
52 lines (45 loc) · 1.66 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
name: Publish to WinGet Stable
# Wait for the Workflow Publish to Winget to be completed
on:
workflow_run:
workflows: ["Publish to WinGet"]
types: [completed]
jobs:
check-update-job:
runs-on: ubuntu-latest
outputs:
needs_update: ${{ steps.check-updates.outputs.result }}
version: ${{ steps.get-version.outputs.version }}
tag: ${{ steps.get-version.outputs.tag }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Needed to fetch all tags
- name: Get latest tag
id: get-version
run: |
git fetch --tags
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "Latest tag: $latest_tag"
echo "version=${latest_tag#v}" >> "$GITHUB_OUTPUT"
echo "tag=${latest_tag}" >> "$GITHUB_OUTPUT"
- name: Check updates
id: check-updates
run: |
echo "result=$(scripts/do_next_stable_release.sh $URL)" >> "$GITHUB_OUTPUT"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
URL: "https://api.github.com/repos/microsoft/winget-pkgs/contents/manifests/v/vim/vim"
REF_NAME: ${{ steps.get-version.outputs.tag }}
publish-winget-stable:
runs-on: ubuntu-latest
needs: check-update-job
if: needs.check-update-job.outputs.needs_update == 'true'
steps:
- uses: vedantmgoyal9/winget-releaser@main
with:
identifier: vim.vim
installers-regex: 'gvim.*(x64|x86|arm64).exe$'
token: ${{ secrets.WINGET_TOKEN }}
version: ${{ needs.check-update-job.outputs.version }}
release-tag: ${{ needs.check-update-job.outputs.tag }}