Update #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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://www.synology.com/en-global/releaseNote/SynologyDriveClient | grep -oPm1 'Version: \K[\d.]+-\d+') | |
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@v5 | |
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 | |