This example demonstrates how to token gate and publish your PhaserJS Game on Valist.
Click here to view this project on Valist.
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: './',
}
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'
See the CLI Quick Start for more info.
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
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