Skip to content

feat: add class validator on actions bodies #6

feat: add class validator on actions bodies

feat: add class validator on actions bodies #6

Workflow file for this run

name: Release
on:
pull_request:
types:
- closed
branches:
- main
env:
REGISTRY: ghcr.io
ORG_NAME: ${{ github.repository_owner }}
IMAGE_NAME: ${{ github.event.repository.name }}
CONFIG_FILE: kubernetes/nanoforge/editor-override.yaml
PUBLIC_MODE: ${{ vars.PUBLIC_MODE }}
PUBLIC_PM_URL: ${{ vars.PUBLIC_PM_URL }}
PUBLIC_DOCS_URL: ${{ vars.PUBLIC_DOCS_URL }}
PUBLIC_LANDING_URL: ${{ vars.PUBLIC_LANDING_URL }}
permissions:
contents: write
packages: write
attestations: write
id-token: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
if: github.repository_owner == 'NanoForge-dev' && github.event.pull_request.merged == true && startsWith(github.head_ref, 'releases/')
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Prepare
uses: ./.github/actions/prepare
env:
PUBLIC_MODE: ${{ vars.PUBLIC_MODE }}
PUBLIC_PM_URL: ${{ vars.PUBLIC_PM_URL }}
- name: Release packages
uses: ./node_modules/@nanoforge-dev/actions/actions/release-packages
with:
packages: '@nanoforge-dev/editor'
tag-format: '{version}'
latest: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
beta-release:
name: Beta release
runs-on: ubuntu-latest
if: github.repository_owner == 'NanoForge-dev' && github.event.pull_request.merged == true && !startsWith(github.head_ref, 'releases/')
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Prepare
uses: ./.github/actions/prepare
- name: Release beta
uses: ./node_modules/@nanoforge-dev/actions/actions/release-dev
with:
package: '@nanoforge-dev/editor'
tag: beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
push-image:
name: Push image
runs-on: ubuntu-latest
if: github.repository_owner == 'NanoForge-dev'
needs: [release]
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
- name: Push Docker image
uses: ./.github/actions/docker-push
with:
target: editor
registry: ${{ env.REGISTRY }}
image: ${{ env.ORG_NAME }}/${{ env.IMAGE_NAME }}
token: ${{ secrets.TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
config-file: ${{ env.CONFIG_FILE }}
args: |
PUBLIC_MODE
PUBLIC_PM_URL
PUBLIC_DOCS_URL
PUBLIC_LANDING_URL
publish-docs:
name: Publish docs
runs-on: ubuntu-latest
if: github.repository_owner == 'NanoForge-dev'
needs: [push-image]
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
- name: Checkout docs repository
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
path: docs-dist
repository: nanoforge-dev/docs
token: ${{ secrets.ACTIONS_KEY }}
- name: Prepare
uses: ./.github/actions/prepare
- name: Publish docs
uses: ./node_modules/@nanoforge-dev/actions/actions/synchronize-docs
with:
repository: editor
category: editor