Skip to content

Update

Update #74

name: Update
on:
# Runs at 10:00 UTC every day
schedule:
- cron: '0 10 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
sync:
name: 🔄 Sync version with upstream
environment: "Candidate Branch"
runs-on: ubuntu-latest
steps:
- name: 🔄 Sync version with upstream
uses: snapcrafters/ci/sync-version@main
with:
token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }}
update-script: |
VERSION=$(curl -sL https://proton.me/download/PassDesktop/linux/x64/version.json |
jq -r .Releases[0].Version
)
CHECKSUM=$(curl -sL https://proton.me/download/PassDesktop/linux/x64/version.json |
jq -r .Releases[0].File[0].Sha512CheckSum
)
sed -i 's/^\(version: \).*$/\1'"$VERSION"'/' snap/snapcraft.yaml
sed -i 's,\(source-checksum: sha512/\).*$,\1'"$CHECKSUM"',' snap/snapcraft.yaml