Skip to content

Commit

Permalink
add version badge
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhumbert committed Jun 23, 2023
1 parent 687e34a commit 47cd437
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 23 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ jobs:
build:
name: Build (${{ matrix.config }})
runs-on: windows-latest
permissions:
contents: write

strategy:
matrix:
Expand All @@ -22,6 +24,7 @@ jobs:
run: cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_CI_BUILD=ON -DGITHUB_ENV="$env:GITHUB_ENV" -G Ninja

- name: Build
id: build
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.config }}

- name: Get short SHA
Expand Down Expand Up @@ -61,4 +64,19 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ${{ env.MOD_ZIP_FILENAME }}_${{ env.PRETTY_CONFIG }}_${{ env.SHORT_SHA }}_requirements_pdb
path: ${{ github.workspace }}/game_dir_requirements_debug/**
path: ${{ github.workspace }}/game_dir_requirements_debug/**

- name: 'Version Badge'
if: always()
run: |
mkdir badge
echo '{"cp_version":{"label":"Cyberpunk 2077","status":"${{ env.CYBERPUNK_2077_GAME_VERSION }}","color":"${{ steps.build.outcome == 'success' && '31b75d' || 'red' }}"}}' > badge/shields.json
- name: Push shields branch
if: github.ref == 'refs/heads/main'
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: shields
FOLDER: badge
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 47cd437

Please sign in to comment.