-
Notifications
You must be signed in to change notification settings - Fork 8
52 lines (45 loc) · 1.51 KB
/
build.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
name: Build and Deploy
on:
release:
types: [ published, prereleased ]
jobs:
build:
name: Create And Upload Release
runs-on: ubuntu-latest
container: 7cav/armake
environment:
name: production
steps:
- name: Install dependencies
run: apk add curl python3 sshpass
- name: Clone repo
uses: actions/checkout@master
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Build release
run: |
chmod +x deploy.sh
./deploy.sh ${{ steps.get_version.outputs.VERSION }}
- name: Upload Sandbox Release
uses: JasonEtco/upload-to-release@master
with:
args: release/Mission_sandbox_v${{ steps.get_version.outputs.VERSION }}.zip application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Sandbox No Radio Release
uses: JasonEtco/upload-to-release@master
with:
args: release/Mission_sandbox_noradio_v${{ steps.get_version.outputs.VERSION }}.zip application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Uploading to Server
uses: actions/checkout@v3
uses: Dylan700/sftp-upload-action@latest
with:
server: ${{ secrets.SERVER }}
username: ${{ secrets.SERVER_USER }}
password: ${{ secrets.SERVER_PASSWORD }}
port: 22
uploads: |
./server_missions/ => ./