Skip to content

Commit

Permalink
Update dotnet-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sator-imaging authored Sep 20, 2024
1 parent fb106c5 commit fabe979
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/dotnet-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,25 @@ jobs:
with:
name: ${{ inputs.artifact_name }}
path: 'src/**/Release/*.nupkg'


- name: git setup
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# to omit `--set-upstream origin` for git push
git config --global --add --bool push.autoSetupRemote true
git fetch --all
- name: docsgen
run: |
cd src/DocsGen
dotnet run -c Release "../StaticMemberAnalyzer.Analysis/Resources.resx" "../../${{ env.docsgen_file_name }}"
# commit docsgen result
cd ../..
git add ${{ env.docsgen_file_name }}
git commit -m "[bot] ${{ env.docsgen_file_name }}" || true
git push || true

# actions/cache can be used to share data across jobs
- name: Commit for Unity
Expand All @@ -107,22 +120,11 @@ jobs:
run: |
ls -al
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# to omit `--set-upstream origin` for git push
git config --global --add --bool push.autoSetupRemote true
git fetch --all
### no way! no create-remote-if-not-exists option!!
git switch release/${{ inputs.release_ver }} || git switch -c release/${{ inputs.release_ver }}
git pull || true
git branch -vv
# commit docsgen result
git add ${{ env.docsgen_file_name }}
git commit -m "[bot] ${{ env.docsgen_file_name }}" || true
git push || true
# upload compiled assembly
# trailing slash is required to sync (copy) contents instead of directory
rsync -avr --existing --checksum src/StaticMemberAnalyzer.Package/bin/Release/*/ ${{ env.unity_folder }}
Expand Down

0 comments on commit fabe979

Please sign in to comment.