name: "Distribute upload" description: "Uploads the package from the dist dir to GitHub artifacts or Google Drive" inputs: service: description: "Where to upload the package (github or gdrive)" default: "github" github-target-filename: description: "The filename to upload (only used by GitHub artifacts)" gdrive-target-dir: description: "The directory to upload (only used by Google Drive)" gdrive-secret-key: description: "The Google Drive secret key" gdrive-parent-folder-id: description: "The Google Drive parent folder ID" runs: using: "composite" steps: # Upload to GitHub - if: ${{ inputs.service == 'github' }} uses: actions/upload-artifact@v4 with: name: ${{ inputs.github-target-filename }} path: ./dist retention-days: 3 # Upload to Google Drive - if: ${{ inputs.service == 'gdrive' }} uses: symless/gdrive-upload@target-glob with: credentials: ${{ inputs.gdrive-secret-key }} target: "./dist/*" parent_folder_id: ${{ inputs.gdrive-parent-folder-id }} child_folder: Snapshots/${{ inputs.gdrive-target-dir }}