diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d537e2a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,57 @@ +name: Release + +on: + workflow_dispatch: + +env: + BUILD_TYPE: Release + +jobs: + create_release: + name: Create release + runs-on: ubuntu-latest + outputs: + upload_url: ${{steps.create_release.outputs.upload_url}} + steps: + - name: Check out repository + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + draft: true + tag_name: ${{github.ref}} + release_name: Release ${{github.ref}} + + build-windows: + name: Build Windows + needs: create_release + runs-on: windows-latest + steps: + - uses: actions/checkout@v3.3.0 + with: + submodules: recursive + + - name: Build Plugin + working-directory: ${{github.workspace}}/build + run: | + cmake.exe -G "Visual Studio 17 2022" -A x64 -T ClangCL .. + cmake --build . --config=release -j4 + + - name: Add LV2 Archive + run: Compress-Archive -Path ${{github.workspace}}\build\neural_amp_modeler.lv2 -Destination neural_amp_modeler.lv2.zip + + - name: Upload Plugin Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.create_release.outputs.upload_url }} + asset_path: ./neural_amp_modeler.lv2.zip + asset_name: neural_amp_modeler.lv2.zip + asset_content_type: application/zip