Skip to content

Commit

Permalink
Merge pull request #27 from zfox23/v0.5.0
Browse files Browse the repository at this point in the history
v0.5.0
  • Loading branch information
zfox23 authored Mar 11, 2021
2 parents 24092b9 + d7f84da commit dc9d26a
Show file tree
Hide file tree
Showing 16 changed files with 1,043 additions and 391 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/deploy-main-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Deploy-Main-Build

on:
push:
branches:
- main

jobs:
Deploy-Main-Build:
runs-on: ubuntu-latest
if: github.event.pusher.name != 'hifibuild'

steps:
- name: View Commit Author
run: echo "The last push was made by a user named ${{ github.event.pusher.name }}."

- uses: actions/checkout@v2
with:
token: ${{ secrets.GUSTAVO_TOKEN }}

- name: Bump npm prerelease version
run: |
git config --global user.email "[email protected]"
git config --global user.name "hifibuild"
npm version prerelease -m "Bump package version to %s"
git push
- uses: actions/setup-node@v2
with:
node-version: '14'

- name: Install Modules
run: npm i

- name: Maybe Build WebJS Version of Library
run: npm run build:web:prod

- name: Create WebJS Main ZIP
uses: papeloto/action-zip@v1
with:
files: dist/
dest: dist/highfidelity-hifi-audio-web.zip

- name: Maybe Upload WebJS Version to Latest S3 Folder
uses: highfidelity/s3-sync-action@master
with:
args: --follow-symlinks --delete
env:
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 }}
AWS_REGION: 'us-west-2' # optional: defaults to us-east-1
SOURCE_DIR: ${{runner.workspace}}/hifi-spatial-audio-js/dist
DEST_DIR: releases/main

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

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

- name: Some alerts
run: echo "New 'main' library files uploaded to S3 and published to npm. This Action does not automatically update links on https://www.highfidelity.com/api/download , nor does it upload any documentation."

9 changes: 7 additions & 2 deletions .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ on:
jobs:
Run-Jest-Unit-Tests:
runs-on: ubuntu-latest
if: github.event.pusher.name != 'hifibuild'

steps:
- name: View Commit Author
run: echo "The last push was made by a user named ${{ github.event.pusher.name }}."

- uses: actions/checkout@v2

- uses: actions/setup-node@v2
Expand All @@ -19,7 +24,7 @@ jobs:
run: npm i

- name: Run Jest Unit Tests
run: npm run test
run: npm run test -- --ci

- name: Unit Tests Passed
if: ${{ success() }}
Expand All @@ -29,4 +34,4 @@ jobs:
- name: Unit Tests Failed
if: ${{ failure() }}
run: |
curl --request POST --url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' --header 'content-type: application/json' --data '{ "context": "tests", "state": "failure", "description": "Tests failed", "target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" }'
curl --request POST --url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' --header 'content-type: application/json' --data '{ "context": "tests", "state": "failure", "description": "Tests failed", "target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" }'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Here's a super basic version of how to use the High Fidelity Spatial Audio Clien
// They'll be standing at the origin, facing "forward".
let initialHiFiAudioAPIData = new HighFidelityAudio.HiFiAudioAPIData({
position: new HighFidelityAudio.Point3D({ "x": 0, "y": 0, "z": 0 }),
orientationEuler: new HighFidelityAudio.OrientationEuler3D({ "pitch": 0, "yaw": 0, "roll": 0 })
orientation: new HighFidelityAudio.OrientationQuat3D({ "w": 1, "x": 0, "y": 0, "z": 0 })
});

// Set up our `HiFiCommunicator` object, supplying our media stream and initial user data.
Expand Down
9 changes: 6 additions & 3 deletions RELEASE_INSTRUCTIONS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
## Making a New Release of the High Fidelity Spatial Audio Client Library
1. [Appropriately bump](https://semver.org/) the version of the Client Library by modifying:
1. The `version` value inside `./package.json`.
2. The `version` value inside `./package-lock.json`.
1. [Appropriately bump](https://semver.org/) the version of the Client Library by using the `npm version` command. For example, you might do the following:
1. Check out a new branch on your fork of this repository with `git checkout -b <new branch name>`.
2. Run `npm version <major | minor | patch>` (depending on whether you want to rev the `major`, `minor`, or `patch` version number).
3. Run `git push -u origin <new branch name>` to push the version changes to your branch.
4. Make a new PR against the base repository containing your version changes.
5. Have someone at High Fidelity merge the PR.
2. Make a Pull Request to pull all of the code from the `main` branch into the `release` branch.
- [Click here for a quick link to do this.](https://github.com/highfidelity/hifi-spatial-audio-js/compare/release...main?expand=1)
3. Have the PR reviewed and merged.
Expand Down
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.4.3",
"version": "0.5.0",
"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
Loading

0 comments on commit dc9d26a

Please sign in to comment.