fix: Further simplification of params #41
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: Github + NPM Release | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
config-file: release-please-config.json | |
manifest-file: .release-please-manifest.json | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js '20.17.0' | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.17.0" | |
registry-url: "https://registry.npmjs.org" | |
scope: "@lukso" | |
cache: "pnpm" | |
- name: Setup Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Install Dependencies | |
run: pnpm install | |
# `npm run build:js` will also generate the auto-generated constants for methods, errors and events, | |
# including extracting their devdocs and userdocs | |
- name: Prepare artifacts to publish | |
run: pnpm run build | |
- name: Tests | |
run: pnpm run test | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Colled documentation | |
run: | | |
pnpm gendocs | |
- name: 'Deploy astro example' | |
run: | | |
if [ "$CLOUDFLARE_API_TOKEN" == "" ]; then | |
echo "CLOUDFLARE_API_TOKEN is not set" | |
exit 1 | |
fi | |
if [ "$CLOUDFLARE_ACCOUNT_ID" == "" ]; then | |
echo "CLOUDFLARE_ACCOUNT_ID is not set" | |
exit 1 | |
fi | |
pnpm wrangler:deploy | |
env: | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} | |
- name: Deploy | |
# if: ${{ steps.release.outputs.release_created }} | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs | |
enable_jekyll: true | |
- run: | | |
(cat <<END > outputs.json | |
${{toJSON(steps.release.outputs)}} | |
END | |
) | |
node ./scripts/publish.mjs outputs.json | |
if: ${{ steps.release.outputs.releases_created }} | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |