sample code for Github Actions Workflows to build Crestron 4-series / VC-4 CPZ releases
Two example Github Actions workflows are included in this project.
Firstly, .github/workflows/release.yml
runs a build and uploads it as a release, whenever a new tag is pushed that begins with a "v".
release.yml
includes a Powershell script to modify the VersionInfo.cs in the project to include the version tag in the C# code.
To trigger the workflow, commit all changes to master, then add a new tag and push it.
For example:
# add all non-excluded files
git add .
# commit the changes
git commit -m "write the changelog here"
# add a release tag
git tag v1.0.0
# push the commit and the tag to the origin (github)
git push origin --tags
On the Github website in the Actions tab, any running or completed actions can be seen with their log files.
Further information is in the actions doc
Secondly, .github/workflows/build-on-push.yml
runs a build whenever any push occurs.
Generally this is less useful than the second and will cause a build to occur whenever code is pushed.
To trigger this workflow, simply push to the github repo.
The output and logs for both of these actions are available in the "Action" tab of the Github repo.
To use these scripts in your own projects, create a .github/workflows folder in your project, copy one of the yml files to your project and customize the sln / cpz paths in the yml file.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Chris Poole | AVSP Ltd |
---|---|
github.com/ninjaoxygen |
github.com/avspltd |
@ninjaoxygen | |
[email protected] | [email protected] |
Project Link: https://github.com/avspltd/github-build-cpz