🎓 A1Learner
🔍
0 of 47 lessons completed

Julia Publishing Workflow

Publishing workflow is the set of steps that moves a finished release from a local project to a public registry. The steps run in order, and each step checks the release before the next begins.

A release file states a name and a version

The code writes a project file. The printout shows its name and version.

write("publish_a.toml", "[project]\nname = \"Tool\"\nversion = \"1.0.0\"\n")
print(read("publish_a.toml", String))

A release file also states its compat bounds

The code writes a project file with a bound. The printout shows the bound beside the version.

write("publish_b.toml", "[project]\nname = \"Tool\"\nversion = \"1.0.0\"\n\n[compat]\nExample = \"1\"\n")
print(read("publish_b.toml", String))

A release file can be checked for its version

The code reads the file back. The printout shows whether the version is present.

write("publish_c.toml", "[project]\nname = \"Tool\"\nversion = \"1.0.0\"\n\n[compat]\nExample = \"1\"\n")
text = read("publish_c.toml", String)
println(occursin("1.0.0", text))

Example

write("publish_example.toml", "[project]\nname = \"ToolKit\"\nversion = \"1.0.0\"\n\n[compat]\nExample = \"1\"\n")
print(read("publish_example.toml", String))

Key points

  • Registry: a public index where released versions are listed for others to find.
  • Register step: the step that adds a new release to the registry.
  • Tag step: the step that marks the exact code for a release version.
  • Release step: the step that makes the tagged version available to users.
  • Project file: a complete Project.toml with a name, a version, and a compat entry is checked before release.

In this example, the code writes a complete project file. It reads the file back. It prints the full file.

Note

the registry steps are described in words here, and the code only writes and reads the project file.

Try it Yourself

Edit the code, then press Run.

Running is simulated · JuliaHub

Exercise

Which step marks the exact code for a release version?