Merge remote-tracking branch 'origin/SettingsMgr' into SettingsMgr #115
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" }' |