-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (32 loc) · 1.52 KB
/
build-whatsapp.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
40
name: Build WhatsApp
on:
schedule: [{cron: "0 0 1 * *"}]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v3
- name: Install nativefier and jq
run: |
npm install -g nativefier && sudo apt install jq -y
- name: Build WhatsApp
run: bash ./build-whatsapp.sh
- name: Upload to release
run: |
VERSION="$(($(wget -qO- https://github.com/cycool29/whatsapp-for-linux/releases/latest | grep -m 1 -o "WhatsApp for Linux.*" | sed 's/WhatsApp for Linux //g' | head -c 2) + 1))"
gh release create ${VERSION}.0 --notes "An unofficial WhatsApp client for Linux, built with nativefier." -t "WhatsApp for Linux ${VERSION}.0"
gh release upload ${VERSION}.0 ./*.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update docs config
run: |
VERSION="$(($(wget -qO- https://github.com/cycool29/whatsapp-for-linux/releases/latest | grep -m 1 -o "WhatsApp for Linux.*" | sed 's/WhatsApp for Linux //g' | head -c 2) + 1))"
sed -i "s/latest-version:.*/latest-version: ${VERSION}/g" ./docs/_config.yml
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add ./docs/_config.yml
git diff-index --quiet HEAD || git commit -m "Update docs config"
git push