add a release action #2
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: Publish release | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build-and-release: | |
runs-on: windows-latest | |
steps: | |
- name: Parse version from latest tag | |
id: version | |
uses: release-kit/semver@v2 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Add msbuild to PATH | |
uses: microsoft/[email protected] | |
- name: Create TeeChart license file from secret | |
uses: lukasa1993/[email protected] | |
id: teechart-license | |
with: | |
secret: ${{ secrets.TEECHARTLICENSE }} | |
b64-decode: false | |
- name: Copy TeeChart license file | |
run: | | |
copy ${{ steps.teechart-license.outputs.file }} "BlueM.Opt\Main\My Project\TeeChart.licenses" | |
copy ${{ steps.teechart-license.outputs.file }} "BlueM.Wave\source\My Project\TeeChart.licenses" | |
copy ${{ steps.teechart-license.outputs.file }} "BlueM.Opt\Tests\SensiPlot_ParameterSampling\My Project\TeeChart.licenses" | |
- name: Build BlueM.Opt | |
run: msbuild BlueM.Opt.sln -restore -property:Platform=x64 -property:Configuration=Release | |
- name: Create zip archive | |
run: Compress-Archive -Path bin\x64\Release\* -DestinationPath BlueM.Opt_${{ steps.version.outputs.full }}_x64.zip | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: "v${{ steps.version.outputs.full }}" | |
draft: true | |
body: "[Full changelog](https://github.com/bluemodel/BlueM.Opt/blob/${{ steps.version.outputs.full }}/BlueM.Opt/Main/BLUEM.OPT_RELEASE-NOTES.txt)" | |
files: BlueM.Opt_${{ steps.version.outputs.full }}_x64.zip |