Skip to content

Commit 907e23f

Browse files
authored
Update publish-winget.yml
1 parent d0b513c commit 907e23f

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

.github/workflows/publish-winget.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,14 @@ on:
55
types: [published]
66

77
jobs:
8-
package_exists:
8+
publish-winget:
99
runs-on: ubuntu-latest
10-
outputs:
11-
exists: ${{ steps.check.outputs.exists }}
1210
steps:
13-
- id: check
11+
- name: Test if the package isn't already published
1412
run: |
1513
VERSION=${GITHUB_REF:11}
1614
echo Looking for https://raw.githubusercontent.com/microsoft/winget-pkgs/master/manifests/OpenJS/NodeJS/$VERSION.yaml
1715
if curl --output /dev/null --silent --head --fail https://raw.githubusercontent.com/microsoft/winget-pkgs/master/manifests/OpenJS/NodeJS/$VERSION.yaml; then
18-
echo "YAML exits, skipping generation"
19-
echo "::set-output name=exists::exists"
20-
else
21-
echo "YAML does not exists, will generate"
22-
echo "::set-output name=exists::not-exists"
16+
echo "Package already exists, exiting"
17+
exit 1
2318
fi
24-
publish-winget:
25-
runs-on: ubuntu-latest
26-
needs: package_exists
27-
if: needs.package_exists.outputs.exists == 'not-exists'
28-
steps:
29-
- name: Greet
30-
run: echo ${{needs.package_exists.outputs.exists}}
31-

0 commit comments

Comments
 (0)