Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #54
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: Wpf Continuous Integration | |
on: | |
push | |
jobs: | |
build: | |
strategy: | |
matrix: | |
targetplatform: [x86] | |
runs-on: windows-2019 | |
name: Build | |
env: | |
App_Packages_Directory: LINKaWPF | |
Solution_Path: LINKaLooks.sln | |
Wpf_Project_Path: LINKaWPF\Linkaa.Looks.csproj | |
Actions_Allow_Unsecure_Commands: true # Allows AddPAth and SetEnv commands | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work. | |
- name: Use Nerdbank.GitVersioning to set version variables | |
uses: aarnott/[email protected] | |
with: | |
setAllVars: true | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '3.1.302' | |
- name: Setup MSBuild.exe | |
uses: microsoft/[email protected] | |
- name: Restore packages | |
run: nuget restore $env:Solution_Path | |
- name: Build solution | |
run: msbuild $env:Solution_Path /t:Build /p:Configuration=Release | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Release-bin | |
path: LinkaWPF/bin/Release | |
tests: | |
name: Test | |
needs: build | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work. | |
- name: Download artifacts | |
uses: actions/[email protected] | |
with: | |
name: Release-bin | |
path: LinkaWPF/bin/Release | |
- name: Start app | |
run: .\LinkaWPF\bin\Release\Linka.looks.exe | |
- name: Wait starting (10s) | |
run: sleep 10 | |
- name: Take Screen | |
uses: OrbitalOwen/[email protected] | |
with: | |
file-name: 'main.jpg' | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Main | |
path: main.jpg | |
- name: Start editor | |
run: .\LinkaWPF\bin\Release\Linka.looks.exe -e | |
- name: Wait starting (10s) | |
run: sleep 10 | |
- name: Take Screen | |
uses: OrbitalOwen/[email protected] | |
with: | |
file-name: 'Editor.jpg' | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Editor | |
path: Editor.jpg | |
- name: Start set | |
run: .\LinkaWPF\bin\Release\Linka.looks.exe -p .\test\testset.linka | |
- name: Wait starting (10s) | |
run: sleep 10 | |
- name: Take Screen | |
uses: OrbitalOwen/[email protected] | |
with: | |
file-name: 'set.jpg' | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: set | |
path: set.jpg | |
installer: | |
name: Create installer | |
needs: build | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work. | |
- name: Download artifacts | |
uses: actions/[email protected] | |
with: | |
name: Release-bin | |
path: LinkaWPF/bin/Release | |
- name: Building the installer | |
run: | | |
"%programfiles(x86)%\Inno Setup 6\iscc.exe" "Linka.looks.iss" | |
shell: cmd | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Installer-bin | |
path: Releases/linka.looks.setup.exe | |
deploy: | |
name: Deploy to server | |
needs: installer | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work. | |
- name: Download artifacts | |
uses: actions/[email protected] | |
with: | |
name: Installer-bin | |
path: Releases/ | |
- run: set -eu | |
- run: mkdir "$HOME/.ssh" | |
- run: echo "${{ secrets.SSH_KEY }}" > "$HOME/.ssh/key" | |
- run: chmod 600 "$HOME/.ssh/key" | |
- name: Deploy to server | |
env: | |
SSH_KEY: ${{ secrets.SSH_KEY }} | |
run: | | |
cat Releases/linka.looks.setup.exe | ssh -i ~/.ssh/key -o StrictHostKeyChecking=no [email protected] sh /var/www/wordpress/dist/linka.looks/updatefile.sh | |