Skip to content

This example demonstrates how to publish your PhaserJS Game on Valist.

Notifications You must be signed in to change notification settings

valist-io/example-phaser-game

 
 

Repository files navigation

PhaserJS Game Example

This example demonstrates how to token gate and publish your PhaserJS Game on Valist.

Click here to view this project on Valist.

Setup

Edit your package.json to build a static version of your site.

{
  "scripts": {
    "build": "next build && next export"
  }
}

Edit your next.config.js to use relative asset paths.

const nextConfig = {
  assetPrefix: './',
}

Publish with the Valist GitHub Action

See the GitHub Action Quick Start for more info.

on:
  release:
    types: [published]
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-node@v2
        with:
          node-version: '16'
      - uses: actions/checkout@v2
      - run: |
          npm install
          npm run build
      - uses: valist-io/[email protected]
        with:
          private-key: ${{ secrets.PRIVATE_KEY }}
          account: <your-account-name-here>
          project: <your-project-name-here>
          release: ${{ github.ref_name }}
          path: './out'

Publish with the Valist CLI

See the CLI Quick Start for more info.

Simple

Run the following from your project root.

$ npm run build
$ valist publish <your-account-name-here>/<your-project-name-here>/<your-release-name-here> ./out

Advanced

Create a valist.yml file in your project root.

account: <your-account-name-here>
project: <your-project-name-here>
release: <your-release-name-here>
path: ./out

Run the following from your project root.

$ npm run build
$ valist publish

About

This example demonstrates how to publish your PhaserJS Game on Valist.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 83.9%
  • JavaScript 8.8%
  • CSS 7.3%