docs(readme): add twincat image #3
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: "Build" | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
branches: [main] | |
jobs: | |
build: | |
outputs: | |
version: ${{ steps.vsix_version_15.outputs.version-number }} | |
name: Build | |
runs-on: windows-latest | |
env: | |
Configuration: Release | |
Vsix15ManifestPath: src\TwinCAT.ProductivityTools.15\source.extension.vsixmanifest | |
Vsix15ManifestSourcePath: src\TwinCAT.ProductivityTools.15\source.extension.cs | |
Vsix17ManifestPath: src\TwinCAT.ProductivityTools.17\source.extension.vsixmanifest | |
Vsix17ManifestSourcePath: src\TwinCAT.ProductivityTools.17\source.extension.cs | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET build dependencies | |
uses: timheuer/bootstrap-dotnet@v1 | |
with: | |
nuget: 'false' | |
sdk: 'false' | |
msbuild: 'true' | |
- name: Format *.cs files | |
run: | | |
dotnet tool restore | |
dotnet format | |
dotnet csharpier . | |
- name: Increment VSIX version 15 | |
id: vsix_version_15 | |
uses: timheuer/vsix-version-stamp@v1 | |
with: | |
manifest-file: ${{ env.Vsix15ManifestPath }} | |
vsix-token-source-file: ${{ env.Vsix15ManifestSourcePath }} | |
- name: Increment VSIX version 17 | |
id: vsix_version_17 | |
uses: timheuer/vsix-version-stamp@v1 | |
with: | |
manifest-file: ${{ env.Vsix17ManifestPath }} | |
vsix-token-source-file: ${{ env.Vsix17ManifestSourcePath }} | |
- name: Build | |
run: msbuild /v:m -restore /p:OutDir=bin\Release | |
- name: Install inno setup package via chocolatey | |
run: choco install innosetup | |
- name: Build setup | |
run: iscc.exe setup\TwinCAT.ProductivityTools.iss | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: TwinCAT.ProductivityTools_${{ steps.vsix_version_15.outputs.version-number }}.exe | |
path: dist/*.exe | |
publish: | |
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | |
needs: build | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download Package artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: TwinCAT.ProductivityTools_${{ needs.build.outputs.version }}.exe | |
- name: Tag and Release | |
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[release]') }} | |
id: tag_release | |
uses: softprops/[email protected] | |
with: | |
body: Release ${{ needs.build.outputs.version }} | |
tag_name: ${{ needs.build.outputs.version }} | |
files: | | |
**/*.exe | |