-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #873 from PlayEveryWare/release-3.3.2
Release 3.3.2
- Loading branch information
Showing
2,578 changed files
with
15,468 additions
and
3,732 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,85 @@ | ||
# Check package.json to see if the version number is different. | ||
# If it isn't changed, then yell at the user. | ||
|
||
name: "CheckPackageVersionChanged" | ||
|
||
on: | ||
push: | ||
branches: [ "stable" ] | ||
pull_request: | ||
branches: [ "stable" ] | ||
workflow_call: | ||
inputs: | ||
new-branch: | ||
description: 'Branch that contains changes. If the context does not have a branch, use this. If context is not provided, this is required.' | ||
required: false | ||
default: '' | ||
type: string | ||
old-branch: | ||
description: 'Branch to compare against. Defaults to main, should be whatever branch is the primary branch.' | ||
required: false | ||
default: 'stable' | ||
type: string | ||
package-location: | ||
description: 'File path to the package.json file to check. Includes the name of the file.' | ||
required: false | ||
default: 'com.playeveryware.eos/package.json' | ||
type: string | ||
|
||
env: | ||
NEW_BRANCH_NAME: ${{ github.head_ref || github.ref_name || inputs.new-branch || 'stable' }} | ||
OLD_BRANCH_NAME: ${{ inputs.old-branch || 'stable' }} | ||
PACKAGE_LOCATION: ${{ inputs.package-location }} | ||
|
||
jobs: | ||
check_package_version_changed: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Get New Package.json | ||
id: get_new_package_json | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const response = await github.rest.repos.getContent({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
path: 'com.playeveryware.eos/package.json', | ||
ref: '${{ env.NEW_BRANCH_NAME }}' | ||
}); | ||
return Buffer.from(response.data.content, response.data.encoding).toString('utf-8'); | ||
result-encoding: string | ||
|
||
- name: Get Old Package.json | ||
id: get_old_package_json | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const response = await github.rest.repos.getContent({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
path: 'etc/PackageTemplate/package.json', | ||
ref: '${{ env.OLD_BRANCH_NAME }}' | ||
}); | ||
return Buffer.from(response.data.content, response.data.encoding).toString('utf-8'); | ||
result-encoding: string | ||
|
||
- name: Extract Value of New Package.json | ||
run: | | ||
echo "new_package_value=${{ fromJson(steps.get_new_package_json.outputs.result).version }}" >> $Env:GITHUB_ENV | ||
shell: | ||
pwsh | ||
|
||
- name: Extract Value of Old Package.json | ||
run: | | ||
echo "old_package_value=${{ fromJson(steps.get_old_package_json.outputs.result).version }}" >> $Env:GITHUB_ENV | ||
shell: | ||
pwsh | ||
|
||
- name: Compare package.json values | ||
if: ${{ Env.old_package_value == Env.new_package_value }} | ||
run: | | ||
echo "::error file=toplevelfile.json::The package.json version was not changed between commits. Failing job." | ||
exit 1 |
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 |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Read Unity Version | ||
id: read_unity_version | ||
|
@@ -21,15 +21,29 @@ jobs: | |
- name: Update README with Badge | ||
run: | | ||
badge_url="https://img.shields.io/badge/Unity-$UNITY_VERSION-brightgreen" | ||
badge_url="https://img.shields.io/badge/Unity-$UNITY_VERSION-blue" | ||
sed -i 's|!\[Unity\](.*)|![Unity]('"$badge_url"')|' README.md | ||
sed -i 's|!\[Unity\](.*)|![Unity]('"$badge_url"')|' etc/PackageTemplate/README.md | ||
sed -i 's|!\[Unity\](.*)|![Unity]('"$badge_url"')|' com.playeveryware.eos/README.md | ||
- name: Check for changes | ||
id: check_changes | ||
run: | | ||
if [ -n "$(git status --porcelain)" ]; then | ||
echo "changes=true" >> $GITHUB_ENV | ||
else | ||
echo "changes=false" >> $GITHUB_ENV | ||
fi | ||
- name: Commit changes | ||
if: env.changes == 'true' | ||
run: | | ||
git config --global user.name 'github-actions' | ||
git config --global user.email '[email protected]' | ||
git add README.md | ||
git add etc/PackageTemplate/README.md | ||
git add com.playeveryware.eos/README.md | ||
git commit -m "Update Unity version badge to $UNITY_VERSION" | ||
git push | ||
- name: No changes to commit | ||
if: env.changes == 'false' | ||
run: echo "No changes to commit" |
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
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
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
2 changes: 1 addition & 1 deletion
2
...gEditors/AndroidBuildConfigEditor.cs.meta → Assets/Plugins/Dummyfile.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Git LFS file not shown
Oops, something went wrong.