make the modular package dl version agnostic #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release | |
# define your mojo package name here | |
# set the path to the directory containing the module files | |
env: | |
PACKAGE_NAME: mojopackage.mojopkg | |
MOJO_DIR: src | |
MOJO_HOME: /home/runner/.modular/pkg/packages.modular.com_mojo/bin | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
curl https://get.modular.com | MODULAR_AUTH=${{ secrets.MODULAR_API }} sh - | |
modular install mojo | |
- name: Build | |
run: | | |
${{ env.MOJO_HOME }}/mojo package ${{ env.MOJO_DIR }} -o ${{ github.workspace }}/${{ env.PACKAGE_NAME }} | |
- name: Upload package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.PACKAGE_NAME }} | |
path: ${{ github.workspace }}/${{ env.PACKAGE_NAME }} |