Skip to content
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

Update alpha publish #6760

Merged
merged 1 commit into from
Jun 28, 2024
Merged
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
23 changes: 12 additions & 11 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,35 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v4

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

- name: Install Dependencies
run: npm install

- name: Build PlayCanvas
run: npm run build

- name: Run Publint
run: npm run publint

- name: Determine pre-release tag
id: release-tag
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
echo "Detected tag: $TAG_NAME"
if [[ "$TAG_NAME" == *-alpha.* ]]; then
echo "tag=alpha" >> $GITHUB_ENV
npm version --no-git-tag-version $TAG_NAME
else
echo "tag=latest" >> $GITHUB_ENV
fi


- name: Install Dependencies
run: npm install

- name: Build PlayCanvas
run: npm run build

- name: Run Publint
run: npm run publint

- name: Publish to npm
run: npm publish --tag ${{ env.tag }}
env:
Expand Down