1+ name : Updates download urls to latest version
2+
3+ on :
4+ repository_dispatch :
5+ types : [desktop-update]
6+
7+ jobs :
8+
9+ create-pr :
10+ name : Create PR for aur repo
11+ runs-on : ubuntu-latest
12+ env :
13+ DESKTOP_VERSION : ${{ github.event.client_payload.version }}
14+ steps :
15+ - name : Checkout repo
16+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+ - name : Create new branch
18+ run : |
19+ git config --global safe.directory '*'
20+ git checkout -b "feature/desktop-$DESKTOP_VERSION"
21+ - name : Update params.yaml
22+ run : |
23+ echo "TODO $DESKTOP_VERSION" > config/_default/params.yaml
24+ - name : Commit and push
25+ run : |
26+ git config user.name "cryptobot"
27+ git config user.email "cryptobot@users.noreply.github.com"
28+ git config push.autoSetupRemote true
29+ git stage config/_default/params.yaml
30+ git commit -m "Update desktop download urls to version ${DESKTOP_VERSION}"
31+ git push
32+ - name : Create pull request
33+ id : create-pr
34+ run : |
35+ printf "Created by $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" > pr_body.md
36+ PR_URL=$(gh pr create --title "Update desktop download to $DESKTOP_VERSION" --body-file pr_body.md)
37+ echo "url=$PR_URL" >> "$GITHUB_OUTPUT"
38+ env :
39+ GH_TOKEN : ${{ secrets.CRYPTOBOT_PR_TOKEN }}
40+ - name : Slack Notification
41+ if : github.event_name == 'release'
42+ uses : rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # v2.3.3
43+ env :
44+ SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK_CRYPTOMATOR_DESKTOP }}
45+ SLACK_USERNAME : ' Cryptobot'
46+ SLACK_ICON : false
47+ SLACK_ICON_EMOJI : ' :bot:'
48+ SLACK_CHANNEL : ' cryptomator-desktop'
49+ SLACK_TITLE : " AUR release PR created for ${{ github.event.repository.name }} ${{ github.event.client_payload.version }} ."
50+ SLACK_MESSAGE : " See <${{ steps.create-pr.outputs.url }}|PR> on how to proceed."
51+ SLACK_FOOTER : false
52+ MSG_MINIMAL : true
0 commit comments