-
-
Notifications
You must be signed in to change notification settings - Fork 171
39 lines (35 loc) · 1.34 KB
/
delete-preview.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# documentation: https://github.com/deltachat/sysadmin/tree/master/download.delta.chat
name: Delete Preview Deliverables
on:
pull_request:
types: [closed]
paths-ignore:
- 'docs/**' # only trigger build if a file outside of /docs was changed
jobs:
delete:
runs-on: ubuntu-latest
steps:
- name: Get Pullrequest ID
id: getid
run: |
export PULLREQUEST_ID=$(jq .number < $GITHUB_EVENT_PATH)
echo ::set-output name=prid::$PULLREQUEST_ID
- name: Renaming
run: |
mkdir preview
# create empty file to copy it over the outdated deliverable on download.delta.chat
echo "This preview build is outdated and has been removed." > empty
cp empty preview/deltachat-desktop-${{ steps.getid.outputs.prid }}.AppImage
cp empty preview/deltachat-desktop-${{ steps.getid.outputs.prid }}.portable.exe
cp empty preview/deltachat-desktop-${{ steps.getid.outputs.prid }}.dmg
cp empty preview/deltachat-desktop-mas-${{ steps.getid.outputs.prid }}.zip
cd ..
- name: Replace builds with dummy files
uses: horochx/[email protected]
with:
user: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
host: "download.delta.chat"
port: 22
local: "preview/*"
remote: "/var/www/html/download/desktop/preview/"