scalasbtchisel

How to publish Chisel package?


I made some chisel projects published on my github repositories. All projects are initialized with chisel-template official example.

For the moment to use these as packages I have to «publish it local». But I want to publish it «officially» on the web to avoid cloning the github project.

Is there a tutorial that explain how to publish chisel-template projects as official package ?


Solution

  • I found a solution with github publish system following Manuel Rodriguez tutorial.

    In short :

    export GITHUB_TOKEN=gxb_xxxTENRSTyourToken
    
    //...
    githubOwner := "GITHUB_USERNAME"
    githubRepository := "GITHUB_PROJECT"
    //...
    
    addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")
    
    $ sbt
    sbt:project> publish
    

    Your project is published. I done it for chisel project fpgamacro as an example.

    To use fpgamacro on another project I added this lines to build.sbt project :

    ...
        externalResolvers += "fpgamacro packages" at "https://maven.pkg.github.com/Martoni/fpgamacro",
    ...
          "Martoni" %% "fpgamacro" % "0.2.0",
    

    I'm using fpgamacro in chisNesPad project for example.