Skip to content

Updated release notes #19

Updated release notes

Updated release notes #19

Workflow file for this run

name: Publish Module
on:
# Run when a tag has been pushed.
push:
tags:
- "v*"
jobs:
main:
name: Publish to NPM
runs-on: ubuntu-latest
environment:
name: Node Package Registry
url: https://npmjs.com/react-unity-webgl
steps:
# Checkout code
- name: Checkout code
uses: actions/checkout@v2
# Setup Node
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 16
registry-url: https://registry.npmjs.org
# Cache Node Module Dependencies
- name: Cache Node Module Dependencies
uses: actions/cache@v2
with:
path: "module/node_modules"
key: nodemodules-${{ runner.os }}-${{ hashFiles('module/package-lock.json') }}
# Install Dependencies
- name: Install Dependencies
working-directory: module
run: npm install
# Lint Code
- name: Lint Code
working-directory: module
run: npm run lint
# Build Source
- name: Build Source
working-directory: module
run: npm run build
# Copy ReadMe into module
- name: Copy ReadMe into module
run: cp README.md module/README.md
# Publish package
- name: Publish package
working-directory: module
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
# Package build
- name: Package build
working-directory: module
run: |
PACKAGE_FILE_NAME=$(npm pack)
mv $PACKAGE_FILE_NAME react-unity-webgl.tgz
# Create Release
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body_path: RELEASE-NOTES.md
draft: false
prerelease: false
# Upload Release Asset
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: module/react-unity-webgl.tgz
asset_name: react-unity-webgl.tgz
asset_content_type: application/tar