ci: added updated winget package submission
This commit is contained in:
32
.github/actions/winget-publish/action.yaml
vendored
Normal file
32
.github/actions/winget-publish/action.yaml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
name: Winget Publish
|
||||
description: A composite action to publish packages to the Windows Package Manager (Winget) repository
|
||||
|
||||
inputs:
|
||||
release-version:
|
||||
description: "Version to publish to Winget package manager (without 'v' prefix)"
|
||||
required: true
|
||||
token:
|
||||
description: "GitHub token with public read permissions on the source repo"
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Submit package to Windows Package Manager Community Repository
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ inputs.token }}
|
||||
run: |
|
||||
# Download latest wingetcreate
|
||||
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
|
||||
|
||||
$packageId = "Deskflow.Deskflow"
|
||||
$installerUrl = "https://github.com/deskflow/deskflow/releases/download/v${{ inputs.release-version }}/deskflow-${{ inputs.release-version }}.0_win64.msi"
|
||||
|
||||
# Submit package update
|
||||
.\wingetcreate.exe update "$packageId" `
|
||||
--version "${{ inputs.release-version }}" `
|
||||
--urls "$installerUrl" `
|
||||
--submit `
|
||||
--token "${{ inputs.token }}"
|
||||
shell: pwsh
|
||||
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
@ -327,3 +327,20 @@ jobs:
|
||||
prerelease: false
|
||||
files: |
|
||||
package-*/*
|
||||
|
||||
winget-publish:
|
||||
needs: release
|
||||
if: contains(github.ref, 'tags/v')
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Fancy Checkout
|
||||
uses: sithlord48/fancy-checkout@v1.0.0
|
||||
|
||||
- name: Get version
|
||||
uses: ./.github/actions/get-version
|
||||
|
||||
- name: Submit
|
||||
uses: ./.github/actions/winget-publish
|
||||
with:
|
||||
release-version: ${{env.DESKFLOW_VERSION}}
|
||||
token: ${{ secrets.WINGET_DEPLOY_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user