Skip to content

Commit

Permalink
Revert activation flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Edvinas01 committed Oct 4, 2023
1 parent 53e4863 commit fb39263
Showing 1 changed file with 9 additions and 64 deletions.
73 changes: 9 additions & 64 deletions .github/workflows/activation.yml
Original file line number Diff line number Diff line change
@@ -1,77 +1,22 @@
name: Activation
name: Acquire activation file

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
workflow_dispatch: { }

jobs:
request_alf:
name: Request .alf file 🔑
activation:
name: Request manual activation file 🔑
runs-on: ubuntu-latest
outputs:
alf: ${{ steps.output.outputs.alf }}
steps:

# Request manual activation file
- name: Request manual activation file
id: alfFile
id: getManualLicenseFile
uses: game-ci/unity-request-activation-file@v2
with:
unityVersion: ${{ env.UNITY_VERSION }}

# Upload artifact (Unity_v20XX.X.XXXX.alf)
- name: Expose as artifact
uses: actions/upload-artifact@v2
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 }}
name: ${{ steps.getManualLicenseFile.outputs.filePath }}
path: ${{ steps.getManualLicenseFile.outputs.filePath }}

0 comments on commit fb39263

Please sign in to comment.