Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Adding github actions to create an NPM package for frontend library and make a release for the repo #103

Merged
merged 13 commits into from
Feb 17, 2023
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
31 changes: 31 additions & 0 deletions .github/workflows/container-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish the Signalling Server container image from our dev branch

on:
push:
branches: ['master']
paths: ['SignallingWebServer/**']

jobs:
signalling-server-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push the Signalling Server container image for Unreal Engine based on our development branch
uses: docker/build-push-action@v3
with:
context: ./SignallingWebServer
tags: 'ghcr.io/epicgames/pixel-streaming-signalling-server:dev'
push: true
73 changes: 73 additions & 0 deletions .github/workflows/create-gh-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Releases

on:
push:
branches: ['master']
paths: ['RELEASE_VERSION']

jobs:

build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./

permissions:
contents: write
steps:
- name: "Checkout source code"
uses: actions/checkout@v3

- name: Read the RELEASE_VERSION file
id: getversion
run: echo "version=$(cat RELEASE_VERSION)" >> $GITHUB_OUTPUT

- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'

- name: Install library deps
working-directory: ./Frontend/library
run: npm ci

- name: Build frontend lib
working-directory: ./Frontend/library
run: npm run build

- name: Install implementations/EpicGames deps
working-directory: ./Frontend/implementations/EpicGames
run: npm ci

- name: Build implementations/EpicGames
working-directory: ./Frontend/implementations/EpicGames
run: npm run build-all

- name: Make output directory for archives
run: mkdir output

- name: Archive Release tar.gz
uses: thedoctor0/zip-release@0.7.1
with:
directory: './output'
path: '../'
type: 'tar'
filename: '${{ github.ref_name }}-${{ steps.getversion.outputs.version }}.tar.gz'
exclusions: '.git .github output Frontend/Docs Frontend/library/dist Frontend/library/types Frontend/library/node_modules Frontend/implementations/EpicGames/node_modules'

- name: Archive Release tar.gz
uses: thedoctor0/zip-release@0.7.1
with:
directory: './output'
path: '../'
type: 'zip'
filename: '${{ github.ref_name }}-${{ steps.getversion.outputs.version }}.zip'
exclusions: '*.git* /*node_modules/* .editorconfig /*types/* /*dist/* /*output/* /*Docs/*'

- name: "Make the release"
uses: ncipollo/release-action@v1
with:
tag: "${{ github.ref_name }}-${{ steps.getversion.outputs.version }}"
artifacts: "output/${{ github.ref_name }}-${{ steps.getversion.outputs.version }}.zip,output/${{ github.ref_name }}-${{ steps.getversion.outputs.version }}.tar.gz"
generateReleaseNotes: true
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Publish library package to npmjs
on:
push:
tags:
- '*'
branches: ['master']
paths: ['Frontend/library/package.json']
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./library
working-directory: Frontend/library
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion Frontend/library/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epicgames-ps/lib-pixelstreamingfrontend-dev",
"version": "0.0.1",
"version": "0.1.1",
"description": "Frontend library for Pixel Streaming",
"main": "dist/lib-pixelstreamingfrontend.min.js",
"types": "types/pixelstreamingfrontend.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion RELEASE_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.1
0.0.2