Skip to content

Update

Update #498

Workflow file for this run

name: Update
on:
workflow_dispatch:
schedule:
- cron: '0 7 * * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch release version
run: |
VERSION_RELEASE=$(curl -s https://archive.synology.com/download/Utility/SynologyDriveClient | grep -oP '\d+\.\d+\.\d+-\d+' | head -n 1)
VERSION=$(echo $VERSION_RELEASE | cut -d'-' -f1)
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
RELEASE=$(echo $VERSION_RELEASE | cut -d'-' -f2)
echo "RELEASE=$RELEASE" >> "$GITHUB_ENV"
- name: Modify files
run: |
sed -i "s@^%global synology_version .*@%global synology_version $VERSION@" synology-drive{,-noextra}.spec
sed -i "s@^%global synology_release .*@%global synology_release $RELEASE@" synology-drive{,-noextra}.spec
if [ ! -z "$(git status -s)" ]; then
sed -i "/%changelog/a * $(date '+%a %b %d %Y') Maxime Dirksen <[email protected]> - $VERSION-$RELEASE\n- Version $VERSION-$RELEASE of Synology Drive Client" synology-drive{,-noextra}.spec
fi
- name: Create PR
uses: peter-evans/create-pull-request@v7
with:
title: "build(deps): update to ${{ env.VERSION }}-${{ env.RELEASE }}"
branch: "v${{ env.VERSION }}-${{ env.RELEASE }}"
commit-message: "chore(deps): update to ${{ env.VERSION }}-${{ env.RELEASE }}"
body: |
Update to ${{ env.VERSION }}-${{ env.RELEASE }}.
This PR has been created automatically.
assignees: "EmixamPP"
labels: dependencies
delete-branch: true