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

Commit

Permalink
Browse files Browse the repository at this point in the history
- Fixed intermittent issues with license activation on 2021+
- Refactor action to use unity license client directly
- Deprecated the need to set OTP code
  • Loading branch information
StephenHodgson authored Jul 18, 2024
1 parent 3b0beac commit 1f7ddc1
Show file tree
Hide file tree
Showing 23 changed files with 20,336 additions and 80,226 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
#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
build-target: StandaloneLinux64
- os: windows-latest
build-target: StandaloneWindows64
- os: macos-latest
- os: macos-13
build-target: StandaloneOSX

steps:
Expand Down Expand Up @@ -58,13 +58,10 @@ jobs:
- name: xrtk/activate-unity-license
uses: ./
with:
# Required
license-type: 'Personal' # Chooses license type to use [ Personal, Professional ]
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
auth-key: ${{ secrets.UNITY_2FA_KEY }} # required for personal activations
# serial: ${{ secrets.UNITY_SERIAL }} # Required for pro activations

- name: Unity Build (${{ matrix.build-target }})
uses: xrtk/unity-action@v6
Expand All @@ -77,7 +74,9 @@ jobs:
if: always()
with:
name: '${{ runner.os }}-${{ matrix.build-target }}-Artifacts'
path: '${{ env.UNITY_PROJECT_PATH }}/Builds'
path: |
${{ env.UNITY_PROJECT_PATH }}/Builds
**/*.log
- name: Clean Artifacts
if: always()
Expand Down
9 changes: 0 additions & 9 deletions .puppeteerrc.cjs

This file was deleted.

34 changes: 8 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ 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` 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)
* `UNITY_SERIAL` Optional, but required for pro activations

> Don't forget that pro/plus licenses only support 2 active licenses at a time!
> [!IMPORTANT]
> Don't forget that pro licenses only support 2 active licenses at a time!
### Create Workflow file

Expand All @@ -41,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 @@ -52,8 +52,7 @@ jobs:
build-targets: StandaloneOSX

steps:
- name: checkout self
uses: actions/checkout@v4
- uses: actions/checkout@v4

# Installs the Unity Editor based on your project version text file
# sets -> env.UNITY_EDITOR_PATH
Expand All @@ -64,27 +63,10 @@ jobs:
build-targets: ${{ matrix.build-target }}

# Activates the installation with the provided credentials
- uses: xrtk/activate-unity-license@v5.1
- uses: xrtk/activate-unity-license@v5
with:
# Required
license-type: 'Personal' # Chooses license type to use [ Personal, Professional ]
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
auth-key: ${{ secrets.UNITY_2FA_KEY }} # required for personal activations
# serial: ${{ secrets.UNITY_SERIAL }} # Required for pro 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.
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ inputs:
description: "2FA (Authenticator App) key"
required: false
default: ''
deprecationMessage: 'This input is no longer required and is unused'

runs:
using: 'node20'
Expand Down
Loading

0 comments on commit 1f7ddc1

Please sign in to comment.