Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(ci): add publish-winget #1002

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/publish-winget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish to winget

on:
workflow_dispatch:
inputs:
tag_name:
description: 'Released tag to publish'
required: true
type: string
release_date:
description: 'Release date'
required: true
type: string
default: '(Get-Date -Format "yyyy-MM-dd")'

jobs:
winget:
name: Publish to winget
runs-on: windows-latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
runs-on: windows-latest
runs-on: windows-latest
# Only allowed to be run on nextcloud-releases repositories
if: ${{ github.repository_owner == 'nextcloud-releases' }}

steps:
- name: Install wingetcreate
run: |
iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
- name: Update manifest and publish
run: |
$githubToken = "${{ secrets.WINGET_GITHUB_TOKEN }}"
$url = "https://github.com/nextcloud-releases/talk-desktop/releases/download/${{ $inputs.tag_name }}/Nextcloud.Talk-windows-x64.exe"
$version = $inputs.tag_name.Trim("v")
.\wingetcreate.exe update Nextcloud.Talk --version $version --urls "$url" --release-date ${{ $inputs.release_date }} --submit --token $githubToken
Loading