release #15
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: release | |
on: | |
workflow_dispatch: | |
jobs: | |
mac: | |
runs-on: macos-latest | |
outputs: | |
version: ${{ steps.get-version.outputs.version }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" # This will checkout all submodules recursively | |
- uses: flucoma/actions/env@main | |
- name: Update flucoma-cli submodule | |
run: | | |
git submodule update --init --recursive --remote | |
cd flucoma-cli | |
git status # Just to verify the current state | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9" | |
- name: install fd | |
run: brew install fd | |
- name: Build FluCoMa CLI | |
run: | | |
cd flucoma-cli | |
mkdir build && cd build | |
cmake -GNinja -DDOCS=ON -DFLUID_BRANCH=production -DPython_ROOT_DIR=${{ env.pythonLocation }} .. | |
pip install -r _deps/flucoma-docs-src/requirements.txt | |
ninja install | |
- name: Copy binaries | |
run: | | |
mkdir -p brew-binaries | |
fd -t x -I fluid- -x cp {} brew-binaries/ | |
- name: Sign binaries | |
uses: flucoma/actions/distribution@main | |
with: | |
glob: "fluid -t x" | |
package: "./brew-binaries" | |
codesign_options: "runtime" | |
cert: ${{ secrets.CERT }} | |
certpwd: ${{ secrets.CERTPWD }} | |
teamid: ${{ secrets.WWDRTEAMID }} | |
apppwd: ${{ secrets.APPSTORECONNECTPWD }} | |
appusr: ${{ secrets.APPSTORECONNECTUSERNAME }} | |
- name: make tarball | |
run: tar -czf brew-binaries.tar.gz brew-binaries | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: macbuild | |
path: brew-binaries.tar.gz | |
- id: get-version | |
run: echo "version=$(cat flucoma.version.rc)" >> $GITHUB_OUTPUT | |
working-directory: flucoma-cli/build/_deps/flucoma-core-src | |
release: | |
runs-on: ubuntu-20.04 | |
needs: [mac] | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: macbuild | |
- name: delete pre-existing release | |
uses: dev-drprasad/[email protected] | |
with: | |
delete_release: true | |
tag_name: ${{ needs.mac.outputs.version }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: package and upload | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ needs.mac.outputs.version }} | |
body: "This is a release build of the FluCoMa CLI tools for homebrew on Mac. The build hash is ${{ github.sha }}" | |
files: brew-binaries.tar.gz | |
prerelease: true | |
tag_name: ${{ needs.mac.outputs.version }} | |
target_commitish: ${{ github.sha }} | |
draft: false |