# Publishing a module

To configure your module when publishing, you can use:

  • an eggs.json or eggs.yaml file;
  • an eggignore file;
  • the options of the publish command.

If there is a conflict between a field in your config, the options of the publish command will take precedence, then the eggignore file and finally the eggs config file.

There are a number of required fields that must appear somewhere in your configuration:

  • name;
  • version and/or bump;
  • files and/or ignore

To publish a module, just navigate to the root of your module (where your egg file is located) and use the following command:

eggs publish
1

Boom! After this, you'll be returned a link to your module on our Gallery. You should also update your README.md with this url so that other users can find your module on Nest.land!

Note: Use the same command to publish a new version to an existing module!

# Options

You can use several options as well, instead of stating these fields in your egg file:

eggs publish --bump minor
eggs publish --version 1.4.2
eggs publish myModule --description "A deno module" --checkFormat
1
2
3

For more details, please refer to configuration.

# Automatic publishing

Thanks to @divy-work, you can now set up a GitHub Actions workflow for automatically publishing your modules!

name: Publish Egg

on:
  release:
    types: [published]

jobs:
  publish-egg:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: denolib/setup-deno@master
        with:
          deno-version: 1.4.1
      - run: deno install -A -f --unstable -n eggs https://x.nest.land/eggs@0.2.3/mod.ts
      - run: |
          export PATH="/home/runner/.deno/bin:$PATH"
          eggs link ${{ secrets.NESTAPIKEY }}
          eggs publish
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

To see how to use this, visit our eggs-ci repository.

# Badge

In addition, you'll have the option of adding our official badge to your project docs, courtesy of @maximousblk. This is the best way you can support our platform and help us grow. We'd really appreciate seeing it on your project!

Round Edition

nest badge rounded

[![nest badge](https://nest.land/badge.svg)](https://nest.land/package/your-module)
1

Block Edition

nest badge sharp

[![nest badge](https://nest.land/badge-block.svg)](https://nest.land/package/your-module)
1

or if you want to support us louder, you can use the large badge:

nest badge large

[![nest badge](https://nest.land/badge-large.svg)](https://nest.land/package/your-package)
1