Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
cache-dependency-path: docs-site/package-lock.json

- name: Install dependencies
run: cd docs-site && npm ci
run: cd docs-site && npm install

- name: Build documentation
run: cd docs-site && npm run build
Expand Down
62 changes: 7 additions & 55 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ on:
type: boolean
default: false

permissions:
contents: write

jobs:
release:
name: Create Release
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -35,7 +38,7 @@ jobs:
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci
run: npm install --no-audit

- name: Run tests
if: ${{ !inputs.skip_tests }}
Expand All @@ -44,9 +47,6 @@ jobs:
- name: Build framework
run: npm run build

- name: Build demo
run: npm run demo:build

- name: Extract release notes from CHANGELOG.md
id: changelog
run: |
Expand Down Expand Up @@ -87,64 +87,16 @@ jobs:
git push origin "v${{ inputs.version }}"

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
continue-on-error: true
with:
tag_name: ${{ inputs.version && format('v{0}', inputs.version) || github.ref_name }}
body: ${{ steps.changelog.outputs.CHANGELOG }}
files: |
dist/*.js
dist/*.d.ts
demos/dist/*.html
demos/dist/*.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Deploy demo to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./demos/dist
cname: gamebyte-framework.dev

docker:
name: Build Docker Image
runs-on: ubuntu-latest
needs: release

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: gamebyte/framework
tags: |
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
6 changes: 4 additions & 2 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ jobs:

- name: Run Snyk security scan
uses: snyk/actions/node@master
continue-on-error: true # Don't fail if Snyk token is missing
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --severity-threshold=medium --fail-on=upgradable

- name: Upload Snyk results to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
if: always()
if: always() && hashFiles('snyk.sarif') != ''
with:
sarif_file: snyk.sarif

Expand Down Expand Up @@ -74,5 +75,6 @@ jobs:

- name: Dependency Review
uses: actions/dependency-review-action@v4
continue-on-error: true # Requires Dependency graph to be enabled in repo settings
with:
fail-on-severity: moderate
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,7 @@ benchmark-results/

# Performance profiling
*.cpuprofile
*.heapprofile
*.heapprofile

# Git worktrees
.worktrees/
Loading
Loading