> For the complete documentation index, see [llms.txt](https://docs.valist.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.valist.io/quick-start/github-action.md).

# GitHub Action

**Note: An account and project is required for the following section.** If you haven't created an account or project yet, visit the following page to learn how:

{% content-ref url="/pages/iSrHS6Po1cDaMdMsMTOt" %}
[Creating an Account & Project](/quick-start/creating-an-account-and-project.md)
{% endcontent-ref %}

### Valist GitHub Action

Valist provides an extremely easy to integrate GitHub Action that enables you to publish anything, including websites, binaries, Electron apps, Android apps, Docker images, or anything else that you're building in your existing CI/CD pipeline!

It can be found in the GitHub Marketplace below:

{% embed url="<https://github.com/marketplace/actions/valist-action>" %}

Here's what it looks like to publish a release to Valist using the Valist GitHub Action:

```yaml
name: Valist Publish
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: valist-io/valist-github-action@v2.5.6
        with:
          private-key: ${{ secrets.PRIVATE_KEY }}
          account: example-acount
          project: example-project
          release: ${{ github.ref_name }} # this can be whatever tag you wish to use
          path: build
```

Here's an [example run](https://github.com/awantoch/valist-publish-gha-example/runs/8096182559) of a React app being published:

<figure><img src="/files/93COhT81c5p8R5QdXlQJ" alt=""><figcaption></figcaption></figure>

Super easy!

### Configuring the workflow file

**Note: An account and project is required for the following section.** If you haven't created an account or project yet, visit the following page to learn how:

{% content-ref url="/pages/iSrHS6Po1cDaMdMsMTOt" %}
[Creating an Account & Project](/quick-start/creating-an-account-and-project.md)
{% endcontent-ref %}

There are several values that you will need to update to get your project publishing correctly.

#### Setting up the GitHub Action's Private Key

First, you will need to setup the `private-key` variable.

* The `private-key` field maps to your GitHub Repository secret that contains a key with permission on the Valist Project. We **strongly recommend** this is a fresh key that only has access to the corresponding Valist Project, and that you don't use an Account-level admin key here.

To generate a fresh key, you can use any Ethereum wallet that can export private keys. We also have a helper script that makes it even easier here:

```bash
npx @valist/keygen eth
```

This will securely generate and output a private key and a public address that you can use to configure your Valist GitHub Action.

<figure><img src="/files/l8iRLpCRtj55NBaLerCr" alt=""><figcaption></figcaption></figure>

Copy this private key, and add it as a GitHub Repository Secret called `VALIST_SIGNER`:

<figure><img src="/files/PoaSJc9W711Q0bFjUt93" alt=""><figcaption></figcaption></figure>

Next, you will need to add this key to your desired project or account members to give it access to publish.

Navigate to your project or account settings in the web dashboard, click on `Members` and add the key -- this will trigger a transaction to add the account to the project:

<figure><img src="/files/fDyBBWjAMFzpbI6nCYJo" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
This step is required before the CLI can publish under the account or project.
{% endhint %}

This will give the key access to the project and enable the GitHub Action to publish to the project!

#### Configuring the account, project, path, and release version

Next, fill out the rest of the values and match them to your Valist Account and Project:

* The `account` field maps to your Valist Account
* The `project` field maps to the Valist Project you wish to publish to

Then, you will need to configure the Release's build path, and the version to tag it with.

Each `release` is immutable and unique, so make sure this is a version tag that matches your workflow.

* The `release` field maps to the version/tag you wish to release. You can use SemVer, or some other release versioning system you wish.

Finally, you will need to point the Action at the build path. Make sure this is your build output, or "dist" folder.

* The `path` field is the folder you wish to release.&#x20;

#### Advanced Configuration (Cross-Platform Releases)

You can also configure cross-platform releases with the `install` field, similarly to the [CLI](/quick-start/cli.md#advanced-configuration-cross-platform-builds).

```
install-name: 'hello'
install-darwin-amd64: hello-darwin-amd64
install-darwin-arm64: hello-darwin-arm64
install-linux-amd64: hello-linux-amd64
install-windows-amd64: hello-windows-amd64
```

This will map each binary to its designated platform, enabling the Valist tooling to install the correct version on the correct platforms.

{% hint style="info" %}
The following platform/architecture combinations are supported:

* install-darwin-amd64
* install-darwin-arm64
* install-linux-amd64
* install-linux-arm64
* install-windows-amd64
  {% endhint %}

For a set of examples, check out these repositories below:

{% embed url="<https://github.com/awantoch/valist-publish-gha-example/blob/main/.github/workflows/publish.yml>" %}
Simple Valist Publish with Timestamp as the Release Name
{% endembed %}

{% embed url="<https://github.com/berty/berty/blob/master/.github/workflows/valist.yml>" %}
Berty Messenger publishing cross-platform builds from their GitHub Releases
{% endembed %}

{% embed url="<https://github.com/valist-io/example-projects/blob/main/.github/workflows/nextjs-project.yml>" %}
Next.js project built and published with the Valist GHA
{% endembed %}

{% embed url="<https://github.com/valist-io/example-projects/blob/main/.github/workflows/multi-platform.yml>" %}
Multi-platform Go binary (Mac, Windows, Linux)
{% endembed %}

{% embed url="<https://github.com/Abbas-Khann/NFTicket/blob/main/.github/workflows/valist.yml>" %}
NFTicket Website deployment
{% endembed %}

{% hint style="success" %}
Want to add your example to these docs? Please feel free to open a PR or contact us at <hello@valist.io> 😄
{% endhint %}

The Valist Action is built to be modular, and compatible with your existing pipeline. There are many ways to configure it! Take a look at the following pages for more examples of how to use it:

{% content-ref url="/pages/e2OZUFDpYTd1gFCPfteA" %}
[Publishing Web Apps](/publishing/publishing-web-apps.md)
{% endcontent-ref %}

{% content-ref url="/pages/nVRuVie4k58vpMzUivYF" %}
[Publishing Binaries & Executables](/publishing/publishing-binaries-and-executables.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.valist.io/quick-start/github-action.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
