Skip to content

Acquire activation file #2

Acquire activation file

Acquire activation file #2

Workflow file for this run

name: Activate License
on:
schedule:
- cron: "0 0 * * 1"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
UNITY_VERSION: 2022.3.10f1
ULF_FILE: Unity_v2022.x.ulf
jobs:
request_alf:
name: Request .alf file 🔑
runs-on: ubuntu-latest
outputs:
alf: ${{ steps.output.outputs.alf }}
steps:
- name: Request manual activation file
id: alfFile
uses: game-ci/unity-request-activation-file@main
with:
unityVersion: ${{ env.UNITY_VERSION }}
# Upload artifact (Unity_v20XX.X.XXXX.alf)
- name: Expose as artifact
uses: actions/upload-artifact@v1
with:
name: ${{ steps.alfFile.outputs.filePath }}
path: ${{ steps.alfFile.outputs.filePath }}
- name: Output
id: output
run: |
echo "::set-output name=alf::${{ steps.alfFile.outputs.filePath }}"
acquire_ulf:
needs: [ request_alf ]
name: Acquire .ulf file 🔑
runs-on: ubuntu-latest
steps:
- name: Download .alf artifact
uses: actions/download-artifact@v2
with:
name: ${{ needs.request_alf.outputs.alf }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install node package, `unity-license-activate`
run: npm install --global unity-license-activate
- name: Install node package, `unity-verify-code`
run: npm install --global unity-verify-code
- name: Activate the license
continue-on-error: true
run: unity-license-activate "${{ secrets.UNITY_EMAIL }}" "${{ secrets.UNITY_PASSWORD }}" "${{ needs.request_alf.outputs.alf }}"
- name: Read ulf
id: ulfRead
uses: juliangruber/[email protected]
with:
path: ${{ env.ULF_FILE }}
- name: Update secret UNITY_LICENSE
uses: hmanzur/[email protected]
with:
name: 'UNITY_LICENSE'
value: '${{ steps.ulfRead.outputs.content }}'
token: ${{ secrets.PAT }}