-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1.08 KB
/
Copy pathwinget.yml
File metadata and controls
39 lines (33 loc) · 1.08 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
on:
workflow_dispatch:
workflow_call:
secrets:
TOKEN:
required: true
env:
CARGO_TERM_COLOR: always
jobs:
publish-winget:
runs-on: windows-latest
permissions:
contents: read
steps:
- name: Get version name
id: get_version
run: |
$response = Invoke-RestMethod -Uri "https://api.github.com/repos/feraxhp/cim/releases/latest" -Method Get
$version_name = $response.name
echo "version_name=$version_name" >> $env:GITHUB_ENV
- name: get numeric version
id: numeric_version
shell: bash
run: echo "nversion=$(echo "${{ env.version_name }}" | cut -d'-' -f1 | cut -d'v' -f2)" >> $GITHUB_ENV
- name: Winget Publish
uses: isaacrlevin/winget-publish-action@v.5
with:
publish-type: "Update"
user: "feraxhp"
package: "cim"
version: ${{ env.nversion }}
url: "https://github.com/feraxhp/cim/releases/download/${{ env.version_name }}/cim-${{ env.nversion }}-x86_64.msi"
token: ${{ secrets.TOKEN }}