Giter Site home page Giter Site logo

fieldofview / cura-plugin-packager-action Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 1.66 MB

Github action to package a repository for a Cura plugin into multiple .curapackage files

License: MIT License

JavaScript 100.00%
github-actions release-automation cura cura-plugin

cura-plugin-packager-action's Introduction

Cura Plugin Packager Action

A github workflow action that creates .curapackage files from Cura plugin source repositories. The action parses plugin.info to detect the compatible major Cura SDK versions and creates a .curapackage file for each SDK version.

Inputs

Parameter Description Default
source_folder Path to the checked out source of the Cura plugin. ``
plugin_id Plugin id, in Cura, can be used to override package.json ``
package_info_path Path to a package.json ``

If no package_info_path is specified a template package.json file is used. If the referenced package.json does not include a package_id field, the plugin_id argument must be specified. If both the package.json file contains a package_id and the plugin_id argument is specified, then the plugin_id argument is used.

Outputs

The following output values can be accessed via ${{ steps.<step-id>.outputs.<output-name> }}:

Name Description Type
packages List of created .curapackage files array

Example

The workflow below, which is triggered when a new tag starting with the letter v is pushed, checks out the repository into a folder named build using actions/checkout, creates packages while referencing the package.json file included in the repository, and uses marvinpinto/action-automatic-releases to create a release with the .curapackage files attached.

name: "Cura-plugin release"

on:
  push:
    tags:
      - "v*"

jobs:
  create-curapackages:
    name: "Tagged Release"
    runs-on: "ubuntu-latest"

    steps:
      - uses: actions/checkout@v3
        with:
          path: "build"
          submodules: "recursive"
      - uses: fieldOfView/cura-plugin-packager-action@main
        with:
          source_folder: "build"
          package_info_path: "build/.github/workflows/package.json"
      - uses: marvinpinto/action-automatic-releases@latest
        with:
          repo_token: "${{ secrets.GITHUB_TOKEN }}"
          prerelease: false
          files: |
            *.curapackage

cura-plugin-packager-action's People

Contributors

dependabot[bot] avatar fieldofview avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

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.