Repository navigation
Add Scoop package manager support for Windows #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,4 +35,44 @@ jobs: | |
| fail_on_unmatched_files: true | ||
| token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} | ||
| files: | | ||
| ${{ env.ARCHIVE_NAME }}.asc | ||
| ${{ env.ARCHIVE_NAME }}.asc | ||
|
|
||
| update-scoop-manifest: | ||
| name: Update Scoop manifest | ||
| runs-on: ubuntu-latest | ||
| if: ${{ !github.event.release.prerelease }} | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #v4.3.1 | ||
| with: | ||
| ref: develop | ||
| token: ${{ secrets.CRYPTOBOT_RELEASE_TOKEN }} | ||
| - name: Download Windows zip and update Scoop manifest | ||
| env: | ||
| RELEASE_TAG: ${{ github.event.release.tag_name }} | ||
| run: | | ||
| set -euo pipefail | ||
| ASSET_NAME="cryptomator-cli-${RELEASE_TAG}-win-x64.zip" | ||
| DOWNLOAD_URL="https://github.com/cryptomator/cli/releases/download/${RELEASE_TAG}/${ASSET_NAME}" | ||
| curl --silent --show-error --fail --location "${DOWNLOAD_URL}" --output "${ASSET_NAME}" | ||
| SHA256=$(sha256sum "${ASSET_NAME}" | awk '{print $1}') | ||
| rm -f "${ASSET_NAME}" | ||
| jq --arg version "${RELEASE_TAG}" \ | ||
| --arg url "${DOWNLOAD_URL}" \ | ||
| --arg hash "${SHA256}" \ | ||
| '.version = $version | .architecture."64bit".url = $url | .architecture."64bit".hash = $hash' \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prevent older release runs from downgrading the manifest. If Skip older versions before rewriting the manifest. Preserve newer-version updates and equal-version checksum refreshes.
|
||
| bucket/cryptomator-cli.json > bucket/cryptomator-cli.json.tmp | ||
| mv bucket/cryptomator-cli.json.tmp bucket/cryptomator-cli.json | ||
| - name: Commit and push updated Scoop manifest | ||
| env: | ||
| RELEASE_TAG: ${{ github.event.release.tag_name }} | ||
| run: | | ||
| set -euo pipefail | ||
| if git diff --quiet bucket/cryptomator-cli.json; then | ||
| echo "Scoop manifest is already up to date." | ||
| exit 0 | ||
| fi | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git add bucket/cryptomator-cli.json | ||
| git commit -m "chore: update scoop manifest to ${RELEASE_TAG}" | ||
| git push origin develop | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Recover when If another commit reaches Add a bounded retry that fetches the current branch and reapplies the update. Recheck the manifest version before retrying. Do not force-push.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "version": "0.6.2", | ||
| "description": "Minimal command-line application that unlocks and mounts Cryptomator vaults.", | ||
| "homepage": "https://github.com/cryptomator/cli", | ||
| "license": { | ||
| "identifier": "AGPL-3.0-only", | ||
| "url": "https://github.com/cryptomator/cli/blob/develop/LICENSE.txt" | ||
| }, | ||
| "architecture": { | ||
| "64bit": { | ||
| "url": "https://github.com/cryptomator/cli/releases/download/0.6.2/cryptomator-cli-0.6.2-win-x64.zip", | ||
| "hash": "52498fe6c0a02f76216fa801a1a114de064b4364702e51548585355fdf8b0a66" | ||
| } | ||
| }, | ||
| "extract_dir": "cryptomator-cli", | ||
| "bin": "cryptomator-cli.exe", | ||
| "notes": "For native filesystem mounting on Windows, install WinFsp (https://winfsp.dev/). Without WinFsp, you can use the WebDAV FallbackMounter.", | ||
| "checkver": "github", | ||
| "autoupdate": { | ||
| "architecture": { | ||
| "64bit": { | ||
| "url": "https://github.com/cryptomator/cli/releases/download/$version/cryptomator-cli-$version-win-x64.zip" | ||
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Promoted prereleases never update the Scoop manifest.
The job subscribes only to
published. GitHub emitsreleased, notpublished, when a pre-release becomes a stable release. The job therefore does not run on promotion, and the manifest keeps the previous version.Subscribe the workflow to
releasedinstead ofpublished. Keep the existing!github.event.release.prereleaseguard.releasedalso fires for direct stable publishes, so the job runs once for each stable release. Do not addreleasednext topublished; that runs the job twice for a direct stable publish.Source: Learnings