-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (30 loc) · 1005 Bytes
/
update-release.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
name: "⬆️ Update release"
on:
release:
types: [published]
jobs:
bump-release:
name: "⬆️ Bump production release"
runs-on: ubuntu-20.04
steps:
- name: Run SSH commands
uses: appleboy/[email protected]
with:
host: ${{ secrets.PROD_SSH_HOST }}
port: ${{ secrets.PROD_SSH_PORT }}
username: ${{ secrets.PROD_SSH_USERNAME }}
password: ${{ secrets.PROD_SSH_PASSWORD }}
script: |
cd "${{ vars.PROD_FULL_DIR }}"
VERSION_NUMBER="${{ github.event.release.name }}"
find ./.env -type f -exec sed -i '' -e "/^APP_VERSION=/s/=.*/=\'$VERSION_NUMBER\'/" {} \;
notify-release:
name: "📣 Notify release"
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Notify on Discord
uses: SethCohen/[email protected]
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}