-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e10521f
commit d61d55e
Showing
3 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Acquire activation file | ||
on: [workflow_dispatch] | ||
jobs: | ||
activation: | ||
name: Request manual activation file 🔑 | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Request manual activation file | ||
- name: Request manual activation file | ||
id: getManualLicenseFile | ||
uses: game-ci/unity-request-activation-file@v2 | ||
# Upload artifact (Unity_v20XX.X.XXXX.alf) | ||
- name: Expose as artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: ${{ steps.getManualLicenseFile.outputs.filePath }} | ||
path: ${{ steps.getManualLicenseFile.outputs.filePath }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- main | ||
env: | ||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | ||
jobs: | ||
|
||
build: | ||
name: Build my project ✨ | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository ☑️ | ||
uses: actions/checkout@v2 | ||
with: | ||
lfs: true | ||
|
||
- name: Active Cache 📁 | ||
uses: actions/[email protected] | ||
with: | ||
path: Library | ||
key: Library | ||
|
||
- name: Unity - Builder 🔨 | ||
uses: game-ci/[email protected] | ||
with: | ||
unityVersion: ${{ vars.UNITY_VERSION }} | ||
targetPlatform: StandaloneWindows64 | ||
kubeVolumeSize: 8Gi | ||
|
||
- name: Upload Build ⬆️ | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: Build | ||
path: build | ||
|
||
- name: Unity - Tests 🧪 | ||
uses: game-ci/[email protected] | ||
with: | ||
unityVersion: ${{ vars.UNITY_VERSION }} | ||
githubToken: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: SonarCloud - Scan 🔍 | ||
uses: sonarsource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
with: | ||
args: > | ||
-Dsonar.organization=${{ secrets.SONAR_ORGANIZATION_KEY }} | ||
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} | ||
release-project: | ||
name: Create Release 📦 | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Checkout repository ☑️ | ||
uses: actions/checkout@v2 | ||
|
||
- name: Create GitHub Release 🐱📦 | ||
uses: actions/setup-node@v1 | ||
id: create-new-release | ||
with: | ||
node-version: "12.x" | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
- run: npx semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Download site ⬇️ | ||
uses: actions/download-artifact@v2 | ||
id: download | ||
with: | ||
name: Build | ||
path: build | ||
|
||
- name: Archive Build content 🗄️ | ||
uses: thedoctor0/zip-release@master | ||
with: | ||
filename: Build.zip | ||
path: build | ||
|
||
- name: Gets latest created release info ℹ️ | ||
id: latest_release_info | ||
uses: jossef/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
- name: Upload asset to Github Release ⬆️ | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{steps.latest_release_info.outputs.upload_url}} | ||
asset_name: Build-v${{github.run_number}}.zip | ||
asset_path: ./Build.zip | ||
asset_content_type: application/zip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Pull Request Check | ||
on: [ pull_request ] | ||
env: | ||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | ||
jobs: | ||
|
||
build: | ||
name: Pull Request Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository ☑️ | ||
uses: actions/checkout@v2 | ||
with: | ||
lfs: true | ||
|
||
- name: Unit Tests 🧪 | ||
uses: game-ci/[email protected] | ||
with: | ||
unityVersion: ${{ vars.UNITY_VERSION }} | ||
githubToken: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: SonarCloud Scan 🔍 | ||
uses: sonarsource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
with: | ||
args: > | ||
-Dsonar.organization=${{ secrets.SONAR_ORGANIZATION_KEY }} | ||
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} | ||
|