Skip to content

Merge pull request #48 from christianhelle/chocolately #490

Merge pull request #48 from christianhelle/chocolately

Merge pull request #48 from christianhelle/chocolately #490

Workflow file for this run

name: Build
on:
pull_request:
push:
paths-ignore:
- '**/*'
- '!.github/workflows/build.yml'
- '!Source/**/*.csproj'
- '!Source/**/*.cs'
- '!Source/ChocolateyPackages/**/*'
branches:
- '*'
env:
VERSION: 1.3.4.${{ github.run_number }}
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Update Version
run: |
((Get-Content -Path Source\Editor\Properties\AssemblyInfo.cs -Raw) -Replace "1.0.*", "${{ env.VERSION }}"")]") | Set-Content -Path Source\Editor\Properties\AssemblyInfo.cs
((Get-Content -Path Source\SqlCeDatabase\Properties\AssemblyInfo.cs -Raw) -Replace "1.0.*", "${{ env.VERSION }}"")]") | Set-Content -Path Source\SqlCeDatabase\Properties\AssemblyInfo.cs
((Get-Content -Path Source\SqlCeDatabase31\Properties\AssemblyInfo.cs -Raw) -Replace "1.0.*", "${{ env.VERSION }}"")]") | Set-Content -Path Source\SqlCeDatabase31\Properties\AssemblyInfo.cs
((Get-Content -Path Source\SqlCeDatabase35\Properties\AssemblyInfo.cs -Raw) -Replace "1.0.*", "${{ env.VERSION }}"")]") | Set-Content -Path Source\SqlCeDatabase35\Properties\AssemblyInfo.cs
((Get-Content -Path Source\SqlCeDatabase40\Properties\AssemblyInfo.cs -Raw) -Replace "1.0.*", "${{ env.VERSION }}"")]") | Set-Content -Path Source\SqlCeDatabase40\Properties\AssemblyInfo.cs
((Get-Content -Path Source\Setup-x86.iss -Raw) -Replace "1.0.0", "${{ env.VERSION }}") | Set-Content -Path Source\Setup-x86.iss
((Get-Content -Path Source\Setup-x64.iss -Raw) -Replace "1.0.0", "${{ env.VERSION }}") | Set-Content -Path Source\Setup-x64.iss
- name: Cake Build
run: ./build.ps1 --verbosity Diagnostic
working-directory: Source
- name: Build Chocolately Package
run: choco pack Source\ChocolatelyPackages\sqlcequery.nuspec --version ${{ env.VERSION }}-alpha
- name: Publish artifacts
uses: actions/upload-artifact@v3
with:
name: Installer (x64)
path: Source/Artifacts/SQLCEQueryAnalyzer-Setup-x64.exe
- name: Publish artifacts
uses: actions/upload-artifact@v3
with:
name: Binaries (x64)
path: Source/Binaries/Release/x64/**/*
- name: Publish artifacts
uses: actions/upload-artifact@v3
with:
name: Installer (x86)
path: Source/Artifacts/SQLCEQueryAnalyzer-Setup-x86.exe
- name: Publish artifacts
uses: actions/upload-artifact@v3
with:
name: Binaries (x86)
path: Source/Binaries/Release/x86/**/*
- name: Publish artifacts
uses: actions/upload-artifact@v3
with:
name: ChocolatelyPackage
path: sqlcequery.${{ env.VERSION }}-alpha.nupkg
- name: Upload Chocolately Package asset
if: github.ref == 'refs/heads/master'
run: |
choco apikey --key ${{ secrets.CHOCOLATEY_API_KEY }} --source https://push.chocolatey.org/
choco push Source\ChocolatelyPackages\sqlcequery.${{ env.VERSION }}-alpha.nupkg --source https://push.chocolatey.org/