diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a38b51f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,101 @@ +name: Release + +on: + workflow_dispatch: + inputs: + base: + description: 'Base branch to deploy core from' + required: false + default: 'main' + +jobs: + macbuild: + runs-on: macos-11 + steps: + - uses: actions/checkout@v2 + - uses: flucoma/actions/env@v4 + with: + branch: ${{ github.event.inputs.base }} + - uses: flucoma/actions/sc@v4 + + - name: zip release + run: zip -r ../FluCoMa-SC-Mac-nightly.zip FluidCorpusManipulation + working-directory: install + + - uses: actions/upload-artifact@v2 + with: + name: macbuild + path: FluCoMa-SC-Mac-"${{ needs.linuxbuild.outputs.version }}".zip + + winbuild: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: flucoma/actions/env@v4 + with: + branch: ${{ github.event.inputs.base }} + - uses: flucoma/actions/sc@v4 + + - name: remove pdb files + run: Remove-Item install -Recurse -Include *.pdb + + - name: zip release + run: Compress-Archive install/FluidCorpusManipulation FluCoMa-SC-Windows-nightly.zip + + - uses: actions/upload-artifact@v2 + with: + name: winbuild + path: FluCoMa-SC-Windows-"${{ needs.linuxbuild.outputs.version }}".zip + + linuxbuild: + runs-on: ubuntu-18.04 + outputs: + version: ${{ steps.get-version.outputs.version }} + steps: + - uses: actions/checkout@v2 + - uses: flucoma/actions/env@v4 + with: + branch: ${{ github.event.inputs.base }} + - uses: flucoma/actions/sc@v4 + + - name: zip release + run: zip -r ../FluCoMa-SC-Linux-nightly.zip FluidCorpusManipulation + working-directory: install + + - id: get-version + run: echo "::set-output name=version::$(cat flucoma.version.rc)" + working-directory: core + + - uses: actions/upload-artifact@v2 + with: + name: linuxbuild + path: FluCoMa-SC-Linux-"${{ needs.linuxbuild.outputs.version }}".zip + + release: + runs-on: ubuntu-latest + needs: [macbuild, winbuild, linuxbuild] + steps: + - uses: actions/download-artifact@v2 + with: + name: macbuild + path: . + + - uses: actions/download-artifact@v2 + with: + name: winbuild + path: . + + - uses: actions/download-artifact@v2 + with: + name: linuxbuild + path: . + + - name: package and upload + uses: softprops/action-gh-release@v1 + with: + name: ${{ needs.linuxbuild.outputs.version }} + body: "This is a release build of the FluCoMa SuperCollider package. The build hash is ${{ github.sha }}" + files: FluCoMa*.zip + prerelease: true + tag_name: ${{ needs.linuxbuild.outputs.version }} + draft: false