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

@xrtk/activate-unity-license@v4 #9

Merged
merged 2 commits into from
Dec 3, 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
14 changes: 12 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
group: ${{ github.ref }}

Expand All @@ -20,7 +21,8 @@ jobs:
validate:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 2 # Use this if you're activating pro license with matrix
fail-fast: false
#max-parallel: 2 # Use this if you're activating pro license with matrix
matrix:
include:
- os: ubuntu-latest
Expand All @@ -42,19 +44,27 @@ jobs:
repository: xrtk/com.xrtk.test
path: test-project

# Installs the Unity Editor based on your project version text file
# sets -> env.UNITY_EDITOR_PATH
# sets -> env.UNITY_PROJECT_PATH
# https://github.com/XRTK/unity-setup
- uses: xrtk/[email protected]
with:
version-file-path: 'test-project/**/ProjectSettings/ProjectVersion.txt'
build-targets: ${{ matrix.build-target }}

# Activates the installation with the provided credentials
# https://github.com/XRTK/activate-unity-license
- name: xrtk/activate-unity-license
uses: ./
with:
# Required
username: ${{ secrets.UNITY_USERNAME }}
password: ${{ secrets.UNITY_PASSWORD }}
# Optional
license-type: 'Personal' # Chooses license type to use [ Personal, Professional ]
serial: ${{ secrets.UNITY_SERIAL }} # Required for pro/plus activations
license-type: 'Professional' # Chooses license type to use [ Personal, Professional ]
auth-key: ${{ secrets.UNITY_2FA_KEY }} # required for personal activations

- name: Unity Build (${{ matrix.build-target }})
uses: xrtk/unity-action@v6
Expand Down
9 changes: 0 additions & 9 deletions .puppeteerrc.cjs

This file was deleted.

24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ This action requires several secrets that need to be setup in the repository or

* `UNITY_USERNAME` The email address you use for your Unity Id
* `UNITY_PASSWORD` The password you use for Unity Id access
* `UNITY_SERIAL` (Required for pro/plus activations)
* `UNITY_SERIAL` Optional, but required for pro/plus activations
* `UNITY_2FA_KEY` Optional, but required for personal activations [2FA Auth Key Setup Steps](#2fa-auth-key-setup-steps)

> Don't forget that pro/plus licenses only support 2 active licenses at a time!

Expand All @@ -40,7 +41,7 @@ jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
#max-parallel: 2 # Use this if you're activating pro license with matrix
max-parallel: 2 # Use this if you're activating pro license with matrix
matrix:
include:
- os: ubuntu-latest
Expand All @@ -59,6 +60,8 @@ jobs:
# sets -> env.UNITY_PROJECT_PATH
# https://github.com/XRTK/unity-setup
- uses: xrtk/[email protected]
with:
build-targets: ${{ matrix.build-target }}

# Activates the installation with the provided credentials
- uses: xrtk/activate-unity-license@v3
Expand All @@ -67,6 +70,21 @@ jobs:
username: ${{ secrets.UNITY_USERNAME }}
password: ${{ secrets.UNITY_PASSWORD }}
# Optional
license-type: 'Professional' # Chooses license type to use [ Personal, Professional ]
serial: ${{ secrets.UNITY_SERIAL }} # Required for pro/plus activations
license-type: 'Personal' # Chooses license type to use [ Personal, Professional ]
# auth-key: ${{ secrets.UNITY_2FA_KEY }} # required for personal activations
```

### 2FA Auth Key Setup Steps

To activate new two factor authentication for your Unity account:

1. Login to Unity account and navigate to `Security`
2. Click `+` (activate) next to `Two Factor Authentication`
3. Select `Start setup`
4. Input password if prompted
5. Select `Authenticator App` to receive codes, then `Next`
6. Click `Can't Scan the barcode?`
7. Copy the 16 character key
8. Create new secret `UNITY_2FA_KEY` and save the generated key from the previous step
9. Scan the QR code in your Authenticator app and verify the code.
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ inputs:
description: 'License type to activate (professional or personal)'
required: false
default: 'Personal'
auth-key:
description: "2FA (Authenticator App) key"
required: false
default: ''

runs:
using: 'node16'
main: 'dist/index.js'
Expand Down
Loading