GithubHelp home page GithubHelp logo

Comments (5)

kmturley avatar kmturley commented on July 28, 2024 1

No problem! If you wanted to take automation a step further you can create a release.yml something like this:

name: Release Aeolus plugin

defaults:
  run:
    shell: bash

on:
  workflow_dispatch:
  push:
    tags:
      - "v*"

env:
  type: Release
  dir_build: ./build
  dir_source: .

jobs:
  create_release:
    name: Create release
    runs-on: ubuntu-latest
    outputs:
      upload_id: ${{ steps.draft_release.outputs.id }}
      upload_url: ${{ steps.draft_release.outputs.upload_url }}
    steps:
      - name: Draft release
        id: draft_release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ github.ref }}
          release_name: Release ${{ github.ref }}
          draft: true

  build_release:
    name: Build release
    needs: create_release
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-2019]
        include:
          - os: ubuntu-latest
            name: linux
            generator: Unix Makefiles
            path: ./build/Aeolus_artefacts
          - os: macos-latest
            name: mac
            generator: Unix Makefiles
            path: ./build/Aeolus_artefacts
          - os: windows-2019
            name: win
            generator: Visual Studio 16 2019
            path: ./build/Aeolus_artefacts/Release

    steps:
    - name: Install Linux dependencies
      if: matrix.os == 'ubuntu-latest'
      run: sudo apt-get update && sudo apt-get install ninja-build libx11-dev libfreetype-dev libasound2-dev libxrandr-dev libxinerama-dev libxcursor-dev

    - name: Install macOS dependencies
      if: matrix.os == 'macos-latest'
      run: brew install ninja

    - name: Install Windows dependencies
      if: matrix.os == 'windows-2019'
      run: choco install ninja

    - name: Checkout code
      uses: actions/checkout@v2
      with:
        submodules: recursive

    - name: Build plugin
      run: |
        cmake \
          -G "${{ matrix.generator }}" \
          -DWITH_ASIO=OFF \
          -S "${{ env.dir_source }}" \
          -B "${{ env.dir_build }}"
        cmake --build "${{ env.dir_build }}" --config "${{ env.type }}"

    - name: List errors
      run: cat "${{ env.dir_build }}/CMakeFiles/CMakeError.log" || true

    - name: List files generated
      run: |
        cd ${{ matrix.path }}
        find "$(pwd)"

    - name: Compress plugin
      run: |
        cd "${{ env.dir_build }}/${{ env.type }}"
        7z a ../aeolus-${{ matrix.name }}.zip -r

    - name: Upload plugin
      uses: actions/upload-release-asset@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        upload_url: ${{ needs.create_release.outputs.upload_url }}
        asset_path: ${{ inputs.dir_build }}/aeolus-${{ matrix.name }}.zip
        asset_name: aeolus-${{ matrix.name }}.zip
        asset_content_type: application/zip

  publish_release:
    name: Publish release
    needs: [create_release, build_release]
    runs-on: ubuntu-latest
    steps:
    - uses: eregon/publish-release@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        release_id: ${{ needs.create_release.outputs.upload_id }}

Then when you tag your repo, it would build and create a release automatically!

git tag v0.0.1
git push && git push origin --tags

from aeolus_plugin.

Archie3d avatar Archie3d commented on July 28, 2024

Hi, no, I do not publish Linux binaries, only Windows and macOS (VST, VST3, AU, and standalone).
However it is very easy to build for Linux as well. What format do you assume? VST3, LV2? Also what target: x86_64, aarch64?..

from aeolus_plugin.

Archie3d avatar Archie3d commented on July 28, 2024

I've tweaked the action on master a bit (after the merge) to clean up the artefacts and also include the AU for macOS.
Thanks for the contribution!

from aeolus_plugin.

Archie3d avatar Archie3d commented on July 28, 2024

BTW, the upload-artifact action loses the executable flags, so the macOS and Linux executables won't run (still an open issue actions/upload-artifact#38), so I'll need to rework the action anyway.

from aeolus_plugin.

kmturley avatar kmturley commented on July 28, 2024

Ah I didn't realize. It says there is a workaround:

Maintaining file permissions and case sensitive files
If file permissions and case sensitivity are required, you can tar all of your files together before artifact upload. Post download, the tar file will maintain file permissions and case sensitivity:

  - name: Tar files
    run: tar -cvf my_files.tar /path/to/my/directory

  - name: Upload Artifact
    uses: actions/upload-artifact@v3
    with:
      name: my-artifact
      path: my_files.tar

https://github.com/actions/upload-artifact#maintaining-file-permissions-and-case-sensitive-files

In my example for release above I show how to zip an artifact manually:

- name: Compress plugin
   run: |
     cd "${{ env.dir_build }}/${{ env.type }}"
     7z a ../aeolus-${{ matrix.name }}.zip -r

7z is installed by default on GitHub runners!

from aeolus_plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.