Skip to content

1.8.0

1.8.0 #31

Workflow file for this run

name: Deploy-to-updater
on:
pull_request:
types:
- closed
branches:
- main
jobs:
deploy:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest # windows-latest | macos-latest
name: Deploy to updater if files changed
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- name: Get monitored changed files
id: changed-files
uses: tj-actions/changed-files@v35
with:
json: "true"
files_from_source_file: .change-monitored
- name: List all changed files and save to env
run: |
echo "changed_files=${{ steps.changed-files.outputs.all_changed_files }}" >> $GITHUB_ENV
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done
- name: Test env vars
run: |
echo "${{env.changed_files}}"
- name: Set up Python 3.10
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
if: steps.changed-files.outputs.any_changed == 'true'
run: |
python -m pip install --upgrade pip
pip install PyYAML
- name: Run release_script.py
if: steps.changed-files.outputs.any_changed == 'true'
env:
FTP_SERVER: ${{ secrets.FTP_SERVER }}
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
run: |
python release_script.py
- name: FTP-Deploy
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/[email protected]
with:
fetch-depth: 2
- name: FTP-Deploy-Action
if: steps.changed-files.outputs.any_changed == 'true'
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
server-dir: Updates/continuous/