Skip to content

Beta builds (manual trigger) #7798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Jun 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
776c308
Rename workflow from "Publish to npm" to "Publish"
kpal81xd Jun 24, 2025
a677fc8
WIP: nightly workflow
kpal81xd Jun 24, 2025
8ddd582
Add optional input for test execution in nightly workflow
kpal81xd Jun 24, 2025
da40a6d
WIP: Converted manual workflow to on push for testing
kpal81xd Jun 24, 2025
3c81a1a
Add Git user configuration step to nightly workflow
kpal81xd Jun 24, 2025
8aa7532
Add steps to push changes and tags after version bump in nightly work…
kpal81xd Jun 24, 2025
c42ed65
Fix GitHub Action user name in nightly workflow configuration
kpal81xd Jun 24, 2025
6c0b740
Updated job name and limited to just run on main
kpal81xd Jun 24, 2025
ce7336f
Updated publish name and allow publishing from dev
kpal81xd Jun 24, 2025
7603470
Combined push commit and tag
kpal81xd Jun 24, 2025
06d8123
Merge branch 'main' into nightly
kpal81xd Jun 26, 2025
346aba3
Manual nightly build
kpal81xd Jun 26, 2025
bfe9873
Removed storing version in env
kpal81xd Jun 26, 2025
68304ed
Add change detection step to nightly workflow
kpal81xd Jun 26, 2025
f1d8dff
Added quiet flag to suppress changes
kpal81xd Jun 26, 2025
8ebfab3
Make workflow fail if no changes found with input override
kpal81xd Jun 26, 2025
9bf4e81
Fix newline issue at end of file in nightly workflow
kpal81xd Jun 26, 2025
beb1e78
Fix fetch-depth configuration in nightly workflow
kpal81xd Jun 26, 2025
35448b6
Fix conditional syntax in nightly workflow change detection
kpal81xd Jun 26, 2025
1b2babb
Changed tag from nightly to beta
kpal81xd Jun 26, 2025
0cbcb10
Update Node.js version to 22.x in CI and publish workflows
kpal81xd Jun 26, 2025
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
56 changes: 56 additions & 0 deletions .github/workflows/beta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Beta

on:
workflow_dispatch:
inputs:
force:
description: 'Force release even if no changes detected'
type: boolean
default: false

permissions:
contents: write

jobs:
beta:
runs-on: ubuntu-latest
if: github.repository == 'playcanvas/engine' && github.ref_name == 'main'
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'npm'
registry-url: 'https://registry.npmjs.org/'

- name: Configure Git User
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
shell: bash

- name: Check for changes
if: github.event.inputs.force == 'false'
run: |
last_tag=$(git describe --tags --abbrev=0)
if ! git diff --quiet --exit-code $last_tag; then
echo "Changes found since v$last_tag"
else
echo "No changes detected since v$last_tag"
exit 1
fi

- name: Bump version
run: |
npm version prerelease --preid=beta

- name: Push version
run: |
git push origin HEAD:${{ github.ref_name }}
git push origin --tags
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js 18.x
- name: Setup Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
name: Publish to npm
name: Publish

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-preview.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'

jobs:
publish-npm:
publish:
runs-on: ubuntu-latest
if: github.repository == 'playcanvas/engine'
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Node.js 18.x
- name: Set up Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
Expand All @@ -40,6 +41,8 @@ jobs:
run: |
if [[ "${{ env.TAG }}" =~ "preview" ]]; then
tag=preview
elif [[ "${{ env.TAG }}" =~ "beta" ]]; then
tag=beta
else
tag=latest
fi
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "playcanvas",
"version": "2.9.0-dev.0",
"version": "2.9.0-beta.0",
"author": "PlayCanvas <[email protected]>",
"homepage": "https://playcanvas.com",
"description": "PlayCanvas WebGL game engine",
Expand Down
4 changes: 2 additions & 2 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

MAIN_BRANCH="main"

PRE_ID_DEV="dev"
PRE_ID_BETA="beta"
PRE_ID_PREVIEW="preview"

RELEASE_PREFIX="release-"
Expand Down Expand Up @@ -64,7 +64,7 @@ if [[ "$BRANCH" == "$MAIN_BRANCH" ]]; then
git branch "$RELEASE_BRANCH" "$BRANCH"

# Bump minor prerelease version on main
npm version preminor --preid=$PRE_ID_DEV --no-git-tag-version
npm version preminor --preid=$PRE_ID_BETA --no-git-tag-version
git commit -m "$RELEASE_MESSAGE" -- package.json package-lock.json

# Switch to release branch
Expand Down