Skip to content

Commit

Permalink
Merge pull request #5 from highfidelity/main
Browse files Browse the repository at this point in the history
Bump patch version to 7 to test new GHA and associated scripts
  • Loading branch information
zfox23 authored Feb 16, 2021
2 parents 6814f91 + fb130cd commit be86c4e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 40 deletions.
39 changes: 10 additions & 29 deletions .github/workflows/deploy-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,49 +18,26 @@ jobs:
- name: Install Modules
run: npm i

- name: Build NodeJS Version of Library
run: npm run build:node

- id: publish
name: Maybe Publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}

- name: Alert that version did not change
if: steps.publish.outputs.type == 'none'
run: echo "Package version didn't change from ${{ steps.publish.outputs.old-version }}! We won't take any further actions."

- name: Maybe Build and Publish New Documentation
if: steps.publish.outputs.type != 'none'
run: npm run docs:buildAndUpload
env:
INPUT_TOKEN: 'empty'
AWS_ACCESS_KEY_ID: ${{ secrets.IAM_SPATIAL_AUDIO_JS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.IAM_SPATIAL_AUDIO_JS_SECRET }}

- name: Maybe Build WebJS Version of Library
if: steps.publish.outputs.type != 'none'
run: npm run build:web:prod
env:
INPUT_TOKEN: 'empty'

- name: Create WebJS Release ZIP
if: steps.publish.outputs.type != 'none'
uses: papeloto/action-zip@v1
with:
files: dist/
dest: dist/highfidelity-hifi-audio-web.zip
env:
INPUT_TOKEN: 'empty'

- name: Maybe Upload WebJS Version to Latest S3 Folder
if: steps.publish.outputs.type != 'none'
uses: highfidelity/s3-sync-action@master
with:
args: --follow-symlinks --delete
env:
INPUT_TOKEN: 'empty'
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.IAM_SPATIAL_AUDIO_JS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.IAM_SPATIAL_AUDIO_JS_SECRET }}
Expand All @@ -69,12 +46,10 @@ jobs:
DEST_DIR: releases/latest

- name: Maybe Upload WebJS Version to Versioned S3 Folder
if: steps.publish.outputs.type != 'none'
uses: highfidelity/s3-sync-action@master
with:
args: --follow-symlinks --delete
env:
INPUT_TOKEN: 'empty'
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.IAM_SPATIAL_AUDIO_JS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.IAM_SPATIAL_AUDIO_JS_SECRET }}
Expand All @@ -83,7 +58,13 @@ jobs:
DEST_DIR: releases/v${{ steps.publish.outputs.version}}

- name: Alert about manually-updating website
if: steps.publish.outputs.type != 'none'
run: echo "Job complete. This Action does not automatically update https://www.highfidelity.com/api/download - please update the website now."
env:
INPUT_TOKEN: 'empty'
run: echo "New library files uploaded to S3. This Action does not automatically update links on https://www.highfidelity.com/api/download - please update the website now."

- name: Build NodeJS Version of Library
run: npm run build:node

- id: publish
name: Maybe Publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
17 changes: 8 additions & 9 deletions RELEASE_INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ After you click "Publish release", [this GitHub Action](./.github/workflows/depl
1. Check out the code.
2. Setup a NodeJS `v14.y.z` environment.
3. Install the NodeJS modules required to build the Client Library.
4. Build the NodeJS version of the library.
5. Publish the NodeJS library module to [npmjs.com/package/hifi-spatial-audio](https://www.npmjs.com/package/hifi-spatial-audio).
- If the GitHub action detects that the version of the module we were about to upload to NPMJS.com is older or the same version as the one already up there, we echo a message to the GHA logs and _stop here_.
6. Build the library's TypeDoc documentation, then upload that documentation to S3.
7. Build the WebJS version of the Client Library.
8. Create a `.zip` file containing the two Client Library files (base "Audio" library and optional "Controls" library)
9. Upload the `.zip` file and the two Client Library files to the `latest` folder inside the releases S3 bucket.
10. Upload the `.zip` file and the two Client Library files to a folder corresponding to the current version of the Library inside the releases S3 bucket.
11. Echo a message to the GHA logs about the fact that the Action does not automatically update `https://www.highfidelity.com/api/download`, which must be updated manually.
4. Build the library's TypeDoc documentation, then upload that documentation to S3.
5. Build the WebJS version of the Client Library.
6. Create a `.zip` file containing the two Client Library files (base "Audio" library and optional "Controls" library)
7. Upload the `.zip` file and the two Client Library files to the `latest` folder inside the releases S3 bucket.
8. Upload the `.zip` file and the two Client Library files to a folder corresponding to the current version of the Library inside the releases S3 bucket.
9. Echo a message to the GHA logs about the fact that the Action does not automatically update `https://www.highfidelity.com/api/download`, which must be updated manually.
10. Build the NodeJS version of the library.
11. Publish the NodeJS library module to [npmjs.com/package/hifi-spatial-audio](https://www.npmjs.com/package/hifi-spatial-audio).
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hifi-spatial-audio",
"version": "0.2.6",
"version": "0.2.7",
"description": "hifi-spatial-audio allows developers to integrate High Fidelity's spatial audio technology into their JavaScript projects.",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down

0 comments on commit be86c4e

Please sign in to comment.