Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PriNova/MojoPkgWorkflow
This Repository shows how to use a simple GitHub Action script for compiling a mojo directory into a package.
https://github.com/PriNova/MojoPkgWorkflow
Last synced: 27 days ago
JSON representation
This Repository shows how to use a simple GitHub Action script for compiling a mojo directory into a package.
- Host: GitHub
- URL: https://github.com/PriNova/MojoPkgWorkflow
- Owner: PriNova
- Created: 2023-10-03T16:21:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-04T09:32:13.000Z (about 1 year ago)
- Last Synced: 2024-10-29T11:10:00.398Z (about 2 months ago)
- Homepage:
- Size: 12.7 KB
- Stars: 12
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-mojo - MojoPkgWorkflow - Packaging Mojo🔥 via GitHub Action Script. (🛠️ Development Tools / Advent of Code 2023)
README
## Packaging 📦 Mojo 🔥 via GitHub Action Script
This Repository shows how to use a simple GitHub Action script for compiling a mojo directory into a package 📦.
You can find the action script here --> [Action Script](./.github/workflows/mojopkgscript.yaml).
To use this action script in your own workflow be sure to set your own GitHub secret for the Mojo API key. How to set a GitHub secret can be found [here](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions). The variable used in the Action script for your API is 'MODULAR_API'. Be sure to use the same name or change the variable name in the script.
* Set the package name in the `PACKAGE_NAME` environment variable.
* Set your path of the directory to be packaged in the `MOJO_DIR` environment variable.Everytime you push to the repository the action script will compile the mojo directory into a package and upload it as an artifact in the GitHub workflow. From there users can download the package and use it in hteir own code base. You can modify this script with additional actions for release deploys on the GitHub Release page.
The `testpkg.mojo` file is a simple mojo that uses the compiled package to call a function.
You can read more about packaging at the Modular documentation page found [here](https://docs.modular.com/mojo/manual/get-started/packages.html)