Skip to content

itch.ioへの自動リリース対応#171

Merged
ayutaz merged 3 commits intodevelopfrom
feat/deply_itch
Jun 18, 2025
Merged

itch.ioへの自動リリース対応#171
ayutaz merged 3 commits intodevelopfrom
feat/deply_itch

Conversation

@ayutaz
Copy link
Contributor

@ayutaz ayutaz commented Jun 15, 2025

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

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

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: read for accessing repository contents.
  • actions: read for interacting with GitHub Actions artifacts.
  • packages: write for 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

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -2,2 +2,7 @@
 
+permissions:
+  contents: read
+  actions: read
+  packages: write
+
 on:
EOF
@@ -2,2 +2,7 @@

permissions:
contents: read
actions: read
packages: write

on:
Copilot is powered by AI and may make mistakes. Always verify output.
@ayutaz ayutaz changed the title Feat/deply itch itch.ioへの自動リリース対応 Jun 17, 2025
@ayutaz ayutaz force-pushed the feat/deply_itch branch from 25fac2b to 7fc3d8a Compare June 17, 2025 23:58
@ayutaz ayutaz merged commit 2260718 into develop Jun 18, 2025
13 checks passed
@ayutaz ayutaz deleted the feat/deply_itch branch June 18, 2025 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant