Skip to content

Build and Deploy

Build and Deploy #81

Workflow file for this run

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
env:
SERVER: ${{ secrets.SERVER }}
U_USER: ${{ secrets.SERVER_USER }}
U_PASS: ${{ secrets.SERVER_PASSWORD }}
run: |
sshpass -p "$U_PASS" scp -r server_missions/* $U_USER@$SERVER:/C:/arma3/servers/server_master/mpmissions/.