fix: create .cmd shim wrappers on Windows #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Winget | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Tag to publish (for example: v1.0.0)" | |
| required: true | |
| type: string | |
| permissions: | |
| contents: read | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.repository_owner == 'arcmantle' }} | |
| env: | |
| WINGET_TOKEN: ${{ secrets.WINGET_TOKEN }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Resolve release tag | |
| id: tag | |
| shell: bash | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "value=${{ github.event.inputs.tag }}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "value=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Wait for GitHub release assets | |
| shell: bash | |
| run: | | |
| for i in {1..30}; do | |
| if gh release view "${{ steps.tag.outputs.value }}" --repo "${{ github.repository }}" >/dev/null 2>&1; then | |
| echo "Release found for tag ${{ steps.tag.outputs.value }}" | |
| exit 0 | |
| fi | |
| echo "Release not ready yet. Retrying in 10s..." | |
| sleep 10 | |
| done | |
| echo "Timed out waiting for release ${{ steps.tag.outputs.value }}" | |
| exit 1 | |
| - name: Publish release to Winget | |
| if: ${{ env.WINGET_TOKEN != '' }} | |
| uses: vedantmgoyal9/winget-releaser@v2 | |
| with: | |
| identifier: Arcmantle.Nodeman | |
| token: ${{ env.WINGET_TOKEN }} | |
| installers-regex: '(?i)windows_amd64\\.zip$' | |
| release-tag: ${{ steps.tag.outputs.value }} | |
| - name: Missing Winget token notice | |
| if: ${{ env.WINGET_TOKEN == '' }} | |
| run: echo "WINGET_TOKEN is not configured. Skipping Winget publication." |