Skip to content

Amend last commit: Fix path filtering #120

Amend last commit: Fix path filtering

Amend last commit: Fix path filtering #120

Workflow file for this run

name: Package Application with Pyinstaller
on:
push:
branches:
- 'wip'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create Version file
run: |
echo VERSION = \"`git describe --always --abbrev=8 --dirty`\" > version.py
- name: Package Application
uses: walmis/pyinstaller-action-windows@main
with:
path: .
- name: Make Zip
id: zip
run: |
commit_id=$(git describe --always --abbrev=8)
branch_name=$(git rev-parse --abbrev-ref HEAD)
zip_filename="VPforce-TelemFFB-${branch_name}-${commit_id}.zip"
echo "{ \"filename\" : \"${zip_filename}\", \"date\": \"`date -Iseconds`\", \"version\": \"${commit_id}\" }" > latest.json
cd dist/windows/VPforce-TelemFFB && zip -r "../../../${zip_filename}" .
echo "BRANCH_NAME=${branch_name}" >> $GITHUB_ENV
echo "ZIP_FILENAME=${zip_filename}" >> $GITHUB_ENV
- name: Deploy to Server
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-v"
SOURCE: "VPforce-TelemFFB*.zip latest.json"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ${{ secrets.REMOTE_TARGET }}
#EXCLUDE: "/dist/, /node_modules/"
- name: Invoke webhook
uses: joelwmale/webhook-action@master
with:
url: ${{ secrets.WEBHOOK_URL }}
#headers: '{"repository": "joelwmale/webhook-action"}'
body: '{"content": "🛠️ New Build Published: https://vpforce.eu/downloads/TelemFFB/${{ env.ZIP_FILENAME }}" }'