Merged
Conversation
Comment on lines
+260
to
+295
| needs: [ build-windows, build-mac, check-branch ] | ||
| if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name != 'pull_request' && (github.event_name == 'schedule' || startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/tags/'))) }} | ||
| runs-on: ubuntu-latest | ||
|
|
||
| concurrency: | ||
| group: deploy-itchio-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| platform: [ windows, mac ] | ||
|
|
||
| steps: | ||
| - name: Download build artifact | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.platform == 'windows' && format('Build-StandaloneWindows64-v{0}', needs.check-branch.outputs.current_version) || format('Build-StandaloneOSX-v{0}', needs.check-branch.outputs.current_version) }} | ||
| path: . | ||
|
|
||
| - name: List workspace files (debug) | ||
| run: | | ||
| echo "After download, workspace contents:" && ls -R | ||
|
|
||
| - name: Set package path | ||
| id: pkg | ||
| shell: bash | ||
| run: | | ||
| if [ "${{ matrix.platform }}" == "windows" ]; then | ||
| echo "pkg=Build-StandaloneWindows64-v${{ needs.check-branch.outputs.current_version }}" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "pkg=Build-StandaloneOSX-v${{ needs.check-branch.outputs.current_version }}" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| - name: Push to itch.io | ||
| uses: yeslayla/butler-publish-itchio-action@v1.0.3 | ||
| env: | ||
| BUTLER_CREDENTIALS: ${{ secrets.ITCHIO_API_KEY }} | ||
| ITCH_USER: midralab | ||
| ITCH_GAME: uDesktopMascot | ||
| CHANNEL: ${{ matrix.platform == 'windows' && 'windows-x64' || 'osx-universal' }} | ||
| PACKAGE: ${{ steps.pkg.outputs.pkg }} |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 9 months ago
To fix the issue, we need to add a permissions block to the workflow file. This block should specify the minimal permissions required for the workflow to function correctly. Based on the actions performed in the workflow (e.g., uploading artifacts, checking out code, caching files, and deploying builds), the following permissions are recommended:
contents: readfor accessing repository contents.actions: readfor interacting with GitHub Actions artifacts.packages: writefor deploying builds to external platforms.
The permissions block can be added at the root level of the workflow to apply to all jobs or within individual jobs for more granular control.
Suggested changeset
1
.github/workflows/build.yml
| @@ -2,2 +2,7 @@ | ||
|
|
||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| packages: write | ||
|
|
||
| on: |
Copilot is powered by AI and may make mistakes. Always verify output.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://midralab.itch.io/udesktopmascot