fix: merge #34
Workflow file for this run
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: Release stable version | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: windows-latest | |
env: | |
Solution_Name: src\Backup Service Home 3.sln | |
Test_Project_Path: src\BSH.Test\BSH.Test.csproj | |
steps: | |
- name: Setup MSBuild.exe | |
uses: microsoft/[email protected] | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Restore the application | |
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=Release -p:RestorePackagesConfig=true | |
- name: Build the application | |
shell: powershell | |
run: msbuild $env:Solution_Name /t:Rebuild /p:Configuration=Release | |
- name: Building the installer | |
run: | | |
iscc.exe tools\setup\Setup.iss | |
shell: cmd | |
- name: Release to Github | |
uses: softprops/[email protected] | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
${{runner.workspace}}/bsh3/tools/setup/output/backupservicehome-*.exe | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: backup-service-home-setup | |
path: ${{runner.workspace}}/bsh3/tools/setup/output/backupservicehome-*.exe | |
deploy: | |
runs-on: ubuntu-latest | |
needs: release | |
environment: production | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: backup-service-home-setup | |
path: ~/ | |
- name: Upload to Brightbits | |
uses: mdallasanta/[email protected] | |
with: | |
local: ~/backupservicehome-*.exe | |
remote: '~/' | |
host: ${{secrets.REMOTE_HOST}} # Remote server address - REQUIRED true | |
port: ${{secrets.REMOTE_PORT}} # Remote server port - REQUIRED false - DEFAULT 22 | |
user: ${{secrets.REMOTE_USER}} # Remote server user - REQUIRED true | |
key: ${{secrets.SSH_PRIVATE_KEY}} # Remote server private key - REQUIRED at least one of "password" or "key" | |
ssh_options: -o StrictHostKeyChecking=no # A set of ssh_option separated by -o - REQUIRED false - DEFAULT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null | |
scp_options: -v # Flags to use during scp - REQUIRED false - DEFAULT ''‚ |