Skip to content

Commit

Permalink
Update alpha publish (#6760)
Browse files Browse the repository at this point in the history
  • Loading branch information
slimbuck authored Jun 28, 2024
1 parent bb4f3f7 commit 425c737
Showing 1 changed file with 12 additions and 11 deletions.
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

0 comments on commit 425c737

Please sign in to comment.