Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
nvidia-patch
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
nvidia-patch
Commits
54d73367
Commit
54d73367
authored
Jul 18, 2023
by
reloxx13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add github actions for windows patches on new release
parent
5b530414
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
119 additions
and
0 deletions
+119
-0
.github/workflows/README.md
.github/workflows/README.md
+15
-0
.github/workflows/gen_win_patches.yml
.github/workflows/gen_win_patches.yml
+104
-0
No files found.
.github/workflows/README.md
0 → 100644
View file @
54d73367
# GitHub Actions usage
To create patches to a new driver version simply create a new release with the following name schema:
-
For DCH:
`win-dch-536.67`
-
For Studio:
`win-studio-536.67`
-
If you need to rerun append
`-{try}`
e.g.
`win-dch-536.67-2`
Tagname same as release name.
If the patch file exist for a version, they will get deleted and recreated.
The patches will be added as asset to the release.
> Currently only for windows10 patches
\ No newline at end of file
.github/workflows/gen_win_patches.yml
0 → 100644
View file @
54d73367
name
:
Generate Windows patches
on
:
release
:
types
:
-
created
permissions
:
contents
:
write
jobs
:
build
:
runs-on
:
ubuntu-latest
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
steps
:
-
name
:
Check release name and OS
id
:
check_release
run
:
|
release_name="${{ github.event.release.tag_name }}"
echo "Release Name: $release_name"
if [[ $release_name =~ (win)-(dch|studio)-([0-9]+\.[0-9]+)(-.+)? ]]; then
os="${BASH_REMATCH[1]}"
variant="${BASH_REMATCH[2]}"
version="${BASH_REMATCH[3]}"
echo "Operating System: $os"
echo "Variant: $variant"
echo "Version: $version"
if [ "$os" != "win" ]; then
echo "Not a Windows release. Stopping the CI workflow."
exit 0
fi
if [ "$variant" == "dch" ]; then
variant="DCH"
fi
echo "OS=$os" >> $GITHUB_ENV
echo "VARIANT=$variant" >> $GITHUB_ENV
echo "VERSION=$version" >> $GITHUB_ENV
else
echo "Invalid release name format. Must be in the format 'win-dch-123.45' or 'win-studio-123.45'"
exit 1
fi
-
name
:
Checkout repository
uses
:
actions/checkout@v3
with
:
ref
:
master
-
name
:
Set up Python
uses
:
actions/setup-python@v4
with
:
python-version
:
'
3.10'
-
name
:
Delete Existing Files
run
:
|
echo "Deleting existing files if they exist"
rm -f "${{ github.workspace }}/win/win10_x64/${{ env.VERSION }}/nvencodeapi64.1337"
rm -f "${{ github.workspace }}/win/win10_x64/${{ env.VERSION }}/nvencodeapi.1337"
echo "Existing files deleted successfully"
-
name
:
Run autopatch.py
run
:
|
echo "Running autopatch.py with version ${{ env.VERSION }}"
cd "${{ github.workspace }}/win/tools/autopatch"
python autopatch.py ${{ env.VERSION }}
echo "autopatch.py executed successfully"
-
name
:
Run add_driver.py
run
:
|
echo "Running add_driver.py with variant ${{ env.VARIANT }} and version ${{ env.VERSION }}"
cd "${{ github.workspace }}/tools/readme-autogen"
python add_driver.py -W -P GeForce --variant ${{ env.VARIANT }} -w win10 ${{ env.VERSION }}
echo "add_driver.py executed successfully"
-
name
:
Run readme_autogen.py
run
:
|
echo "Running readme_autogen.py"
cd "${{ github.workspace }}/tools/readme-autogen"
python readme_autogen.py
echo "readme_autogen.py executed successfully"
-
name
:
Commit and push changes
run
:
|
echo "Committing and pushing changes"
cd "${{ github.workspace }}"
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A
git diff --quiet --exit-code --cached || git commit -m "${{ env.OS }}: add support for ${{ env.VARIANT }} driver ${{ env.VERSION }}"
git push origin master
echo "Committed and pushed changes"
-
name
:
Upload Patch Files
uses
:
softprops/action-gh-release@v1
with
:
files
:
|
${{ github.workspace }}/win/win10_x64/${{ env.VERSION }}/nvencodeapi64.1337
${{ github.workspace }}/win/win10_x64/${{ env.VERSION }}/nvencodeapi.1337
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
TAG_NAME
:
${{ github.event.release.tag_name }}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment