-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (52 loc) · 2.1 KB
/
deploy.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Deploy
on:
push:
tags: [ 'v*.*.*' ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download Dalamud
run: |
mkdir dalamud
cd dalamud
wget https://github.com/goatcorp/dalamud-distrib/raw/main/latest.zip
unzip latest.zip
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.x
- name: Restore dependencies
run: dotnet restore
- name: Build
id: build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: dotnet build --no-restore -c Release -p:IsCI=true
- name: Prepare for deploy
if: steps.build.outcome == 'success'
run: |
cp \
bin/x64/Release/net7.0-windows/heliosphere-plugin/latest.zip \
latest.zip
python3 make_repo.py \
latest.zip \
changelog.txt \
https://repo.heliosphere.app/latest.zip \
repo.json
tar -cvf payload.tar \
repo.json \
latest.zip
- name: Deploy
if: steps.build.outcome == 'success'
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
DEPLOY_IP: ${{ secrets.DEPLOY_IP }}
run: |
mkdir -p "$HOME/.ssh"
echo "$DEPLOY_KEY" > "$HOME/.ssh/id_ed25519"
echo "$DEPLOY_IP ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMA/feNbzGMzoVS1uKAQZKU6FaMt8LdIZYnUOgufuneZ" > "$HOME/.ssh/known_hosts"
chmod 0700 "$HOME/.ssh"
chmod 0600 "$HOME/.ssh/known_hosts" "$HOME/.ssh/id_ed25519"
ssh heliosphere@"$DEPLOY_IP" deploy plugin < payload.tar