Skip to content

Bumping frontend ui lib #39

Bumping frontend ui lib

Bumping frontend ui lib #39

name: Publish frontend-ui lib
on:
workflow_dispatch:
push:
branches: ['UE5.5']
paths: ['Frontend/ui-library/package.json']
env:
NODE_VERSION: 18.17.x
jobs:
build:
if: github.repository == 'EpicGamesExt/PixelStreamingInfrastructure'
runs-on: ubuntu-latest
defaults:
run:
working-directory: Frontend/ui-library
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: 'Frontend/ui-library'
sparse-checkout-cone-mode: false
- uses: actions/setup-node@v4
with:
node-version: "${{ env.NODE_VERSION }}"
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- id: get-package-json
run: |
package_content=`cat package.json`
echo "json<<EOF" >> $GITHUB_OUTPUT
echo $package_content >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- uses: actions/github-script@v5
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/lib-frontend-ui-${{ fromJson(steps.get-package-json.outputs.json).version }}',
sha: context.sha
})