Skip to content

Commit

Permalink
fix: New komac update command
Browse files Browse the repository at this point in the history
  • Loading branch information
michidk authored Feb 11, 2024
1 parent 8eaba85 commit 5503377
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ For a real-world example, have a look at my WinGet package updater repository: [
- `komac-token`: The GitHub token to use for authentication.
- **Required**: ✅
- ⚠ **WARNING**: Do **not** directly put the token in the action. Instead, create a repository secret containing the token and use that in the workflow. Refer to [using encrypted secrets in a workflow](https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow) for more information.

- `package-id`: The ID of the package to update.
- `indetifier`: The package identifier of the package to be updated in the [WinGet Community Repository](https://github.com/microsoft/winget-pkgs).
- **Required**: ✅
- **Example**: `michidk.vscli`
- `repo`: The GitHub repository to check for the latest release.
Expand Down
8 changes: 4 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ inputs:
komac-token:
description: 'The GitHub token to use for authentication.'
required: true
package-id:
description: 'The ID of the package to update.'
identifier:
description: 'The PackageIdentifier of the package (case-sensitive).'
required: true
repo:
description: 'The GitHub repository to check for the latest release.'
Expand All @@ -33,7 +33,7 @@ runs:
uses: actions/github-script@v7
with:
script: |
const pkgid = "${{ inputs.package-id }}";
const pkgid = "${{ inputs.identifier }}";
const url = `https://github.com/microsoft/winget-pkgs/tree/master/manifests/${pkgid.charAt(0).toLowerCase()}/${pkgid.replaceAll('.', '/')}`;
const headers = { method: 'HEAD' };
Expand Down Expand Up @@ -77,4 +77,4 @@ runs:
custom-fork-owner: ${{ inputs.custom-fork-owner }}
custom-tool: WinGet Updater $GITHUB_REF
custom-tool-url: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY
args: update --id ${{ inputs.package-id }} --version ${{ steps.latest_release.outputs.result }} --url $FINAL_URL --submit --token ${{ inputs.komac-token }}
args: update --identifier ${{ inputs.identifier }} --version ${{ steps.latest_release.outputs.result }} --url $FINAL_URL --submit --token ${{ inputs.komac-token }}

0 comments on commit 5503377

Please sign in to comment.