feat: use komac v2 (2.3.0+), repo maintainence 🎉

This commit is contained in:
Vedant
2024-06-24 17:57:48 +05:30
parent 15efe5145b
commit 98552911b9
13 changed files with 224 additions and 69 deletions
+2 -2
View File
@@ -7,7 +7,7 @@
"contributorsPerLine": 7,
"contributorsSortAlphabetically": true,
"projectName": "winget-releaser",
"projectOwner": "vedantmgoyal2009",
"projectOwner": "vedantmgoyal9",
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": true,
@@ -24,7 +24,7 @@
]
},
{
"login": "vedantmgoyal2009",
"login": "vedantmgoyal9",
"name": "Vedant",
"avatar_url": "https://avatars.githubusercontent.com/u/83997633?v=4",
"profile": "https://bittu.eu.org",
+1 -1
View File
@@ -1 +1 @@
* @vedantmgoyal2009
* @vedantmgoyal9
+3 -3
View File
@@ -1,9 +1,9 @@
# These are supported funding model platforms
github: vedantmgoyal2009 # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
github: vedantmgoyal9 # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: vedantmgoyal # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
ko_fi: vedantmgoyal # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
+1 -1
View File
@@ -2,7 +2,7 @@ name: 'Bug Report'
description: File a bug report
title: '[Bug]: '
labels: [bug, help wanted]
assignees: vedantmgoyal2009
assignees: vedantmgoyal9
body:
- type: markdown
attributes:
+1 -1
View File
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Review open issues
url: https://github.com/vedantmgoyal2009/winget-releaser/issues
url: https://github.com/vedantmgoyal9/winget-releaser/issues
about: Please ensure you have gone through open issues.
+1 -1
View File
@@ -2,7 +2,7 @@ name: 'Feature Request'
description: Request a new feature
title: '[Feature/Idea]: '
labels: [feat]
assignees: vedantmgoyal2009
assignees: vedantmgoyal9
body:
- type: markdown
attributes:
-20
View File
@@ -1,20 +0,0 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: github-actions
# Workflow files stored in the
# default location of `.github/workflows`
directory: /
schedule:
interval: daily
reviewers:
- vedantmgoyal2009
commit-message:
prefix: chore(deps)
rebase-strategy: auto
target-branch: main
+158
View File
@@ -0,0 +1,158 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="1012px"
height="274px"
viewBox="0 0 1012 274"
version="1.1"
id="SVGRoot"
sodipodi:docname="readme banner.svg"
xml:space="preserve"
inkscape:version="1.2.2 (732a01da63, 2022-12-09)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview986"
pagecolor="#ffffff"
bordercolor="#999999"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="1.2938725"
inkscape:cx="571.54009"
inkscape:cy="65.694263"
inkscape:window-width="3440"
inkscape:window-height="1369"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g8508" /><defs
id="defs981"><linearGradient
inkscape:collect="always"
id="linearGradient1285"><stop
style="stop-color:#a975e5;stop-opacity:1;"
offset="0"
id="stop1281" /><stop
style="stop-color:#1e81ff;stop-opacity:1;"
offset="1"
id="stop1283" /></linearGradient><linearGradient
id="linearGradient28648"
inkscape:swatch="solid"><stop
style="stop-color:#ff0000;stop-opacity:1;"
offset="0"
id="stop28646" /></linearGradient><filter
id="mask-powermask-path-effect63069_inverse"
inkscape:label="filtermask-powermask-path-effect63069"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50"><feColorMatrix
id="mask-powermask-path-effect63069_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" /><feColorMatrix
id="mask-powermask-path-effect63069_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" /></filter><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient1285"
id="linearGradient1287"
x1="2.186017"
y1="271.61258"
x2="1011.5793"
y2="1.6395123"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(6.7089844e-6)" /><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2210"
id="linearGradient28670"
x1="-1.9575247"
y1="25.825182"
x2="19.139517"
y2="4.8704858"
gradientUnits="userSpaceOnUse" /><linearGradient
inkscape:collect="always"
id="linearGradient2210"><stop
style="stop-color:#1e81ff;stop-opacity:1;"
offset="0"
id="stop2208" /><stop
style="stop-color:#a975e5;stop-opacity:1;"
offset="1"
id="stop2206" /></linearGradient><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2210"
id="linearGradient28704"
x1="20.578529"
y1="489.7919"
x2="373.73505"
y2="136.01468"
gradientUnits="userSpaceOnUse" /></defs><g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"><path
stroke="none"
d="M 824.70738,-40.955291 H 1230.1485 V 364.4858 H 824.70738 Z"
fill="none"
id="path17163"
style="stroke-width:25.3401;stroke-linecap:round;stroke-linejoin:round" /><rect
style="fill:url(#linearGradient1287);fill-opacity:1;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke markers fill"
id="rect1219"
width="1012"
height="274"
x="0"
y="0"
ry="30.989719" /><g
id="g8508"
transform="translate(91.749787,-11.102645)"><g
id="g10095"
transform="matrix(2.4226651,0,0,2.4226651,-121.86589,-472.22816)"
style="display:inline"><g
id="g1959-4"
transform="matrix(0.12088784,0,0,0.12088784,68.913761,233.57249)"
style="fill:#e5e5e5;fill-opacity:1;stroke-width:1.00019;stroke-dasharray:none"
class="UnoptimicedTransforms" /><g
id="g10101"
transform="translate(5,-8.5)"><path
id="path17581"
style="fill:#e5e5e5;fill-opacity:1;stroke-width:1.00019;stroke-dasharray:none"
d="m 69.791519,0 c 95.264171,1.2202534 191.462421,-3.3987614 285.779471,12.721357 47.85859,8.046424 97.42441,31.224088 119.8466,76.730475 30.46115,61.551538 31.31574,132.096728 34.84751,199.282508 1.32028,54.67744 2.77833,109.49504 0.93361,164.13035 -4.67385,37.35223 -42.56804,63.9009 -79.27619,59.14758 -94.43544,-1.12091 -189.76386,3.50061 -283.31891,-12.01312 C 101.44549,492.43374 52.067143,469.55489 31.36025,423.80392 3.4479458,362.7008 4.0302947,293.78382 1.1249183,227.95556 0.28879596,171.70469 -0.98338155,115.33202 0.80129474,59.135307 5.2637433,25.842362 36.198535,-0.66821429 69.791519,0 Z"
transform="matrix(0.12088784,0,0,0.12088784,68.913761,233.57249)" /><polyline
points="5 7 10 12 5 17"
id="polyline17165"
style="fill:none;stroke:url(#linearGradient28670);stroke-width:2.36779;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
class="UnoptimicedTransforms"
transform="matrix(2.4316477,0,0,2.4316477,70.613718,235.20069)" /><line
x1="272.89337"
y1="340.46689"
x2="374.25363"
y2="340.46689"
id="line17167"
style="fill:none;stroke:url(#linearGradient28704);stroke-width:40;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
class="UnoptimicedTransforms"
transform="matrix(0.14394087,0,0,0.14394087,62.94463,227.5316)" /></g></g><g
aria-label="KOMAC"
id="text303"
style="font-size:136.063px;line-height:1.25;font-family:'Open Sans';-inkscape-font-specification:'Open Sans';display:inline"><path
d="m 348.45608,196.76775 h -29.63091 l -19.20029,-37.13829 -7.77314,4.65059 v 32.4877 H 265.47625 V 99.636832 h 26.37549 v 42.187508 q 1.66093,-3.18898 3.78691,-6.37796 2.19243,-3.18897 4.25197,-6.04577 l 20.39617,-29.763778 h 28.70079 l -30.62747,43.516248 z"
style="font-weight:800;-inkscape-font-specification:'Open Sans Ultra-Bold';fill:#ffffff"
id="path495" /><path
d="m 449.83896,148.06942 q 0,11.22785 -2.72392,20.4626 -2.65748,9.1683 -8.37106,15.812 -5.71358,6.64371 -14.68258,10.2313 -8.969,3.52117 -21.45916,3.52117 -12.22441,0 -21.1934,-3.52117 -8.90256,-3.58759 -14.68258,-10.16486 -5.78002,-6.6437 -8.57038,-15.87844 -2.79035,-9.23475 -2.79035,-20.59548 0,-15.14764 4.98277,-26.30906 5.04922,-11.22785 15.54626,-17.34006 10.49705,-6.178639 26.84056,-6.178639 16.60925,0 26.97343,6.178639 10.43061,6.17865 15.28051,17.4065 4.8499,11.22786 4.8499,26.3755 z m -66.83564,0 q 0,8.76968 1.99311,15.0812 1.99312,6.31151 6.31152,9.6998 4.31841,3.38829 11.29429,3.38829 7.24164,0 11.49361,-3.38829 4.3184,-3.38829 6.17864,-9.6998 1.92667,-6.31152 1.92667,-15.0812 0,-13.15453 -4.38484,-20.79479 -4.38484,-7.64026 -15.0812,-7.64026 -7.10876,0 -11.49361,3.45473 -4.3184,3.45472 -6.31151,9.83268 -1.92668,6.37795 -1.92668,15.14764 z"
style="font-weight:800;-inkscape-font-specification:'Open Sans Ultra-Bold';fill:#ffffff"
id="path497" /><path
d="m 509.69871,196.76775 -19.86466,-69.95818 h -0.59794 q 0.26575,2.72392 0.5315,7.37451 0.33218,4.65059 0.59793,10.03199 0.26575,5.3814 0.26575,10.36417 v 42.18751 H 467.37833 V 99.636832 h 34.94587 l 20.26329,68.961618 h 0.5315 l 19.86467,-68.961618 h 35.0123 v 97.130918 h -24.11663 v -42.58613 q 0,-4.58415 0.13287,-9.83268 0.19931,-5.31496 0.39862,-9.96555 0.26575,-4.71703 0.46506,-7.44095 h -0.59793 l -19.59892,69.82531 z"
style="font-weight:800;-inkscape-font-specification:'Open Sans Ultra-Bold';fill:#ffffff"
id="path499" /><path
d="M 658.51764,196.76775 653.73417,178.564 h -31.55758 l -4.91634,18.20375 h -28.83366 l 31.69046,-97.52954 h 35.0123 l 32.08908,97.52954 z m -10.2313,-39.72934 -4.18553,-15.94488 q -0.66437,-2.59104 -1.92668,-7.37451 -1.2623,-4.8499 -2.5246,-9.96555 -1.19587,-5.18209 -1.86024,-8.50394 -0.59793,3.32185 -1.72736,8.23819 -1.06299,4.8499 -2.25886,9.63337 -1.12943,4.78346 -1.99311,7.97244 l -4.18553,15.94488 z"
style="font-weight:800;-inkscape-font-specification:'Open Sans Ultra-Bold';fill:#ffffff"
id="path501" /><path
d="m 740.96594,119.76725 q -4.65059,0 -8.30462,1.99311 -3.65404,1.92667 -6.24508,5.64714 -2.59105,3.72048 -3.98622,9.10187 -1.32874,5.31497 -1.32874,12.09154 0,9.16831 2.32529,15.41339 2.3253,6.24508 7.04232,9.43405 4.78347,3.18898 11.95867,3.18898 6.51082,0 12.49016,-1.7938 6.04576,-1.7938 12.15797,-4.3184 v 22.18996 q -6.44439,2.85679 -13.22097,4.11909 -6.71013,1.26231 -14.28395,1.26231 -15.81201,0 -25.91044,-6.24508 -10.03199,-6.31152 -14.81545,-17.47294 -4.71703,-11.16142 -4.71703,-25.91043 0,-11.02855 3.0561,-20.19685 3.12254,-9.16831 9.10187,-15.87845 5.97933,-6.77658 14.74902,-10.43061 8.83612,-3.720475 20.19685,-3.720475 7.04232,0 14.81545,1.660925 7.83957,1.59449 15.28052,5.18209 l -8.03888,20.66191 q -5.31496,-2.52461 -10.7628,-4.25197 -5.44783,-1.72736 -11.56004,-1.72736 z"
style="font-weight:800;-inkscape-font-specification:'Open Sans Ultra-Bold';fill:#ffffff"
id="path503" /></g></g></g></svg>

After

Width:  |  Height:  |  Size: 9.5 KiB

+5
View File
@@ -0,0 +1,5 @@
### Pull Request Checklist
- [ ] The commit message(s) follows the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) guidelines.
### Changes & Notes
+1 -1
View File
@@ -60,7 +60,7 @@ representative at an online or offline event.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
https://github.com/vedantmgoyal2009/winget-releaser/issues.
https://github.com/vedantmgoyal9/winget-releaser/issues.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
+1 -1
View File
@@ -6,7 +6,7 @@ Ensure you've read through the documentation so you understand the core concepts
### How to report a bug
1. Search the [issues](https://github.com/vedantmgoyal2009/winget-releaser/issues) to see if the bug has already been reported by someone else, and/or if it has been already fixed in the latest version.
1. Search the [issues](https://github.com/vedantmgoyal9/winget-releaser/issues) to see if the bug has already been reported by someone else, and/or if it has been already fixed in the latest version.
2. If you don't find anything, create a new issue with the following information:
- A clear and concise description of what the bug is.
- Steps to reproduce the bug.
+29 -18
View File
@@ -1,10 +1,11 @@
<h1> <img src="https://github.com/vedantmgoyal2009/winget-releaser/blob/main/.github/github-actions-logo.png" width="32" height="32" alt="Logo" /> WinGet Releaser (GitHub Action) </h1>
<h1> <img src="https://github.com/vedantmgoyal9/winget-releaser/blob/main/.github/github-actions-logo.png" width="32" height="32" alt="Logo" /> WinGet Releaser (GitHub Action) </h1>
![GitHub contributors (via allcontributors.org)][github-all-contributors-badge]
![GitHub issues][github-issues-badge]
![GitHub release (latest by date)][github-release-badge]
![GitHub Repo stars][github-repo-stars-badge]
![GitHub][github-license-badge]
[![Badge](https://img.shields.io/badge/docs.bittu.eu.org%2Fdocs%2Fwinget--releaser--playground-abcdef?style=flat&logo=windowsterminal&label=Playground%20(dry-run))][playground-link]
Publish new releases of your application to the Windows Package Manager easily.
@@ -21,10 +22,11 @@ expediting the amount of time it takes for a submission to be reviewed.
> At least **one** version of your package should already be present in the [Windows Package Manager Community Repository][winget-pkgs-repo].
> The action will use that version as a base to create manifests for new versions of the package.
1. You will need to create a _classic_ Personal Access Token (PAT) with `public_repo` scope. _New_ fine-grained PATs aren't supported by the action. Review https://github.com/vedantmgoyal2009/winget-releaser/issues/172 for information.
1. You will need to create a _classic_ Personal Access Token (PAT) with `public_repo` scope. _New_ fine-grained PATs aren't supported by the action. Review https://github.com/vedantmgoyal9/winget-releaser/issues/172 for information.
2. Fork the [winget-pkgs][winget-pkgs-repo] repository under the same account/organization as your repository on which
you want to use this action. Ensure that the fork is up-to-date with the upstream repository. You can use **[<img src="https://github.com/vedantmgoyal2009/winget-releaser/blob/main/.github/pull-app-logo.svg" valign="bottom"/> Pull App][pull-app-auto-update-forks]** which keeps your fork up-to-date with the upstream repository via automated pull requests.
2. Fork [microsoft/winget-pkgs][winget-pkgs-repo] under the same account/organization as the project's repository. If you are forking [winget-pkgs][winget-pkgs-repo] on a different account (e.g. bot/personal account), you can use the `fork-user` input to specify the username of the account where the fork is present.
- Ensure that the fork is up-to-date with the upstream. You can use **[<img src="https://github.com/vedantmgoyal9/winget-releaser/blob/main/.github/pull-app-logo.svg" valign="bottom"/> Pull App][pull-app-auto-update-forks]** which keeps your fork up-to-date via automated pull requests.
3. Add the action to your workflow file (e.g. `.github/workflows/<name>.yml`).
@@ -55,7 +57,7 @@ jobs:
publish:
runs-on: windows-latest
steps:
- uses: vedantmgoyal2009/winget-releaser@v2
- uses: vedantmgoyal9/winget-releaser@main
with:
identifier: Package.Identifier
max-versions-to-keep: 5 # keep only latest 5 versions
@@ -74,7 +76,7 @@ jobs:
publish:
runs-on: windows-latest
steps:
- uses: vedantmgoyal2009/winget-releaser@v2
- uses: vedantmgoyal9/winget-releaser@main
with:
identifier: Package.Identifier
installers-regex: '\.exe$' # Only .exe files
@@ -94,13 +96,13 @@ jobs:
runs-on: windows-latest
steps:
- name: Publish X to WinGet
uses: vedantmgoyal2009/winget-releaser@v2
uses: vedantmgoyal9/winget-releaser@main
with:
identifier: Package.Identifier<X>
installers-regex: '\.exe$' # Only .exe files
token: ${{ secrets.WINGET_TOKEN }}
- name: Publish Y to WinGet
uses: vedantmgoyal2009/winget-releaser@v2
uses: vedantmgoyal9/winget-releaser@main
with:
identifier: Package.Identifier<Y>
installers-regex: '\.msi$' # Only .msi files
@@ -126,7 +128,7 @@ jobs:
$VERSION="${{ github.event.release.name }}" -replace '^.*/ '
"version=$VERSION" >> $env:GITHUB_OUTPUT
shell: pwsh
- uses: vedantmgoyal2009/winget-releaser@v2
- uses: vedantmgoyal9/winget-releaser@main
with:
identifier: Package.Identifier
version: ${{ steps.get-version.outputs.version }}
@@ -155,7 +157,7 @@ jobs:
- **Required**: ❌ (Default value: `.(exe|msi|msix|appx)(bundle){0,1}$`)
- **Example**: `installers-regex: '\.exe$' # All EXE's`
- `max-versions-to-keep`: The maximum number of versions of the package to keep in the [WinGet Community Repository][winget-pkgs-repo] repository. If after the current release, the number of versions exceeds this limit, the oldest version will be deleted.
- `max-versions-to-keep`: The maximum number of versions of the package to keep in the [WinGet Community Repository][winget-pkgs-repo]. If after the current release, the number of versions exceeds this limit, the oldest version will be deleted.
- **Required**: ❌ (Default value: `0` - unlimited)
- **Example**: `max-versions-to-keep: 5 # keep only the latest 5 versions`
@@ -165,7 +167,7 @@ jobs:
- **Required**: ❌ (Default value: `${{ github.event.release.tag_name || github.ref_name }}`)
- **Example**: `release-tag: ${{ inputs.version }} # workflow_dispatch input 'version'`
- `token`: The GitHub token with which the action will authenticate with GitHub API and create a pull request on the [WinGet Community Repository][winget-pkgs-repo] repository. **The token should have a `public_repo` scope.**
- `token`: The GitHub token with which the action will authenticate with GitHub API and create a pull request on the [WinGet Community Repository][winget-pkgs-repo]. **The token should have a `public_repo` scope.**
- **Required**: ✅
- **Example**: `token: ${{ secrets.WINGET_TOKEN }} # Repository secret called 'WINGET_TOKEN'`
@@ -178,9 +180,15 @@ jobs:
- **Required**: ❌ (Default value: `${{ github.repository_owner }} # repository owner`)
- **Example**: `fork-user: dotnet-winget-bot # for example purposes only`
<h2> 🚀 Integrating with <a href="https://github.com/russellbanks/Komac"> <img src="https://github.com/vedantmgoyal9/winget-releaser/blob/main/.github/komac-logo.svg" height="24px" style="vertical-align:bottom" alt="Komac logo" /> </a> - Supercharging WinGet Releaser </h1>
The action uses [Komac][komac-repo] under the hood to create manifests and publish them to the [Windows Package Manager Community Repository][winget-pkgs-repo] because of its unique capability to update installer URLs with respect to architecture, installer type, scope, etc.
I'm grateful to [Russell Banks][russellbanks-github-profile], the creator of Komac, for creating such an amazing & wonderful winget manifest creator, which is the core of this action. Again, it is because of Komac that the action can now be used on any platform (Windows, Linux, macOS) and not just Windows (as it was before).
## 🌟 Stargazers over time 👀
[![Stargazers over time](https://starchart.cc/vedantmgoyal2009/winget-releaser.svg)](https://starchart.cc/vedantmgoyal2009/winget-releaser)
[![Stargazers over time](https://starchart.cc/vedantmgoyal9/winget-releaser.svg)](https://starchart.cc/vedantmgoyal9/winget-releaser)
## Contributors ✨
@@ -232,13 +240,16 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification.
Contributions of any kind welcome!
[playground-link]: https://docs.bittu.eu.org/docs/winget-releaser-playground
[dependabot-setup-guide]: https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot#example-dependabotyml-file-for-github-actions
[github-all-contributors-badge]: https://img.shields.io/github/all-contributors/vedantmgoyal2009/winget-releaser/main?logo=opensourceinitiative&logoColor=white
[github-issues-badge]: https://img.shields.io/github/issues/vedantmgoyal2009/winget-releaser?logo=target
[github-release-badge]: https://img.shields.io/github/v/release/vedantmgoyal2009/winget-releaser?logo=github
[github-repo-stars-badge]: https://img.shields.io/github/stars/vedantmgoyal2009/winget-releaser?logo=githubsponsors
[github-license-badge]: https://img.shields.io/github/license/vedantmgoyal2009/winget-releaser?logo=gnu
[pr-screenshot-image]: https://github.com/vedantmgoyal2009/winget-releaser/blob/main/.github/pull-request-by-action-example.png
[github-all-contributors-badge]: https://img.shields.io/github/all-contributors/vedantmgoyal9/winget-releaser/main?logo=opensourceinitiative&logoColor=white
[github-issues-badge]: https://img.shields.io/github/issues/vedantmgoyal9/winget-releaser?logo=target
[github-release-badge]: https://img.shields.io/github/v/release/vedantmgoyal9/winget-releaser?logo=github
[github-repo-stars-badge]: https://img.shields.io/github/stars/vedantmgoyal9/winget-releaser?logo=githubsponsors
[github-license-badge]: https://img.shields.io/github/license/vedantmgoyal9/winget-releaser?logo=gnu
[pr-screenshot-image]: https://github.com/vedantmgoyal9/winget-releaser/blob/main/.github/pull-request-by-action-example.png
[winget-pkgs-repo]: https://github.com/microsoft/winget-pkgs
[komac-repo]: https://github.com/russellbanks/komac
[russellbanks-github-profile]: https://github.com/russellbanks
[pull-app-auto-update-forks]: https://github.com/wei/pull
[gh-encrypted-secrets]: https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow
+21 -20
View File
@@ -1,6 +1,6 @@
name: WinGet Releaser
description: Publish new releases of your application to Windows Package Manager easily.
author: vedantmgoyal2009 (Vedant)
author: vedantmgoyal9 (Vedant)
inputs:
identifier:
required: true
@@ -34,20 +34,7 @@ inputs:
runs:
using: composite
steps:
- uses: actions/[email protected]
with:
check-latest: true
go-version: 1.x
- name: Install dependencies
if: runner.os != 'Windows'
run: |
if [ "$(uname)" == "Darwin" ]; then
brew install msitools
else
sudo apt-get install -y msitools libmsi-dev
fi
shell: bash
- uses: cargo-bins/cargo-binstall@main
- name: Validate inputs
run: |
@@ -67,8 +54,7 @@ runs:
}
shell: pwsh
- name: Install winget-pkgs-automation CLI
run: go install https://github.com/vedantmgoyal2009/winget-pkgs-automation@latest
- run: cargo binstall komac
shell: pwsh
- name: Get release information
@@ -85,8 +71,18 @@ runs:
shell: pwsh
- name: Update & submit manifests
run: winget-pkgs-automation update '{{ inputs.identifier }}' '{{ steps.version-and-urls.outputs.version }}' --urls '{{ steps.version-and-urls.outputs.urls }}' -s --fork-user '{{ inputs.fork-user }}'
run: komac update '{{ inputs.identifier }}' --version '{{ steps.version-and-urls.outputs.version }}' --urls '{{ steps.version-and-urls.outputs.urls }}' --submit
env:
KOMAC_FORK_OWNER: ${{ inputs.fork-user }}
KOMAC_CREATED_WITH: WinGet Releaser
KOMAC_CREATED_WITH_URL: ${{ env.GITHUB_SERVER_URL }}/${{ env.GITHUB_ACTION_REPOSITORY }}
GITHUB_TOKEN: ${{ inputs.token }}
shell: pwsh
- name: Clean up stale branches (for which PRs have been merged)
run: komac cleanup --only-merged
env:
KOMAC_FORK_OWNER: ${{ inputs.fork-user }}
GITHUB_TOKEN: ${{ inputs.token }}
shell: pwsh
@@ -94,7 +90,7 @@ runs:
if: ${{ inputs.max-versions-to-keep }} > 0
run: |
$ToNatural = { [regex]::Replace($_, '\d+', { $args[0].Value.PadLeft(20) }) }
$Versions = winget-pkgs-automation list-versions '{{ inputs.identifier }}' --json | ConvertFrom-Json | Sort-Object $ToNatural -Descending
$Versions = komac list-versions '{{ inputs.identifier }}' --json | ConvertFrom-Json | Sort-Object $ToNatural -Descending
$Reason = 'This version is older than what has been set in `max-versions-to-keep` by the publisher.'
If ($Versions.Count + 1 -gt {{ inputs.max-versions-to-keep }}) {
@@ -103,11 +99,16 @@ runs:
ForEach ($Version in $VersionsToDelete) {
Write-Output "Deleting version: $Version"
winget-pkgs-automation remove-version '{{ inputs.identifier }}' $Version --reason $Reason --fork-user '{{ inputs.fork-user }}'
komac remove '{{ inputs.identifier }}' --version $Version --reason "$Reason" --submit
}
} Else {
Write-Output "No versions to delete. All good :)"
}
env:
KOMAC_FORK_OWNER: ${{ inputs.fork-user }}
KOMAC_CREATED_WITH: WinGet Releaser
KOMAC_CREATED_WITH_URL: ${{ env.GITHUB_SERVER_URL }}/${{ env.GITHUB_ACTION_REPOSITORY }}
GITHUB_TOKEN: ${{ inputs.token }}
shell: pwsh
branding:
color: blue