Error: Branch is dirty. Refusing to base semantic version on uncommitted changes
See original GitHub issueI had the following build file but could not create a clean build.
#- name: Unity - Builder
# uses: game-ci/unity-builder@v2.0-alpha-6
name: Build project
on: [push, pull_request]
jobs:
buildForAllSupportedPlatforms:
name: Build for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
# - StandaloneOSX # Build a macOS standalone (Intel 64-bit).
# - StandaloneWindows # Build a Windows standalone.
- StandaloneWindows64 # Build a Windows 64-bit standalone.
#- StandaloneLinux64 # Build a Linux 64-bit standalone.
# - iOS # Build an iOS player.
# - Android # Build an Android .apk standalone app.
#- WebGL # WebGL.
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v2
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
unityVersion: 2020.3.2f1
allowDirtyBuild: true
- uses: actions/upload-artifact@v2
with:
name: Build-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Common issues - GameCI
Error . Branch is dirty. Refusing to base semantic version on uncommitted changes. This usually happens with GitHub actions when using unity-builder.
Read more >Building Unity with GitHub Actions | isaac broyles home
Note caches created on branches are scoped to that branch, regardless of key ... Refusing to base semantic version on uncommitted changes.
Read more >git - Go Packages
InitRebase initializes a rebase operation to rebase the changes in branch relative to upstream onto another branch. func (*Repository) IsBare ¶.
Read more >batou - PyPI
A utility for automating multi-host, multi-environment software builds and deployments. Navigation. Project description; Release history; Download files ...
Read more >Version Control with Subversion
The svn diff command produces this output by comparing your working files against its pristine text-base. Files scheduled for ad-.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ckcollab The error is there for a reason and as stated in the documentation, simply working around the error is not the recommended approach.
https://game.ci/docs/github/builder#allowdirtybuild
If you working directory has changes since you’ve checked out your branch, this error will show up. The reason for the error and failure is to prevent possible misconfigurations in your workflow. Misconfiguration can potentially lead to bugs in your builds.
The error also indicates which files are “dirty”.
If you’re running test-runner in the same workflow, be sure to add
/artifacts
. to your.gitignore
file.Your configuration should ideally specify only necessary options.
Don’t worry, your assets are very clean 😉 just kidding.
It’s the checked out branch that we call dirty when files change after checkout (thus differ from your branch in version control).
1 of two things happened:
In case of 1, be sure to checkout all your files. For example
In case of 2, this is not good practice and that’s exactly why we’re showing throwing an error for it.