Skip to content

Commit

Permalink
add a release action
Browse files Browse the repository at this point in the history
  • Loading branch information
jamaa committed Feb 11, 2024
1 parent ab644bc commit a07533a
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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/setup-msbuild@v1.1

- name: Create TeeChart license file from secret
uses: lukasa1993/secret-file-action@v1.0.4
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

0 comments on commit a07533a

Please sign in to comment.