Skip to content

Commit

Permalink
Regenerate changelog.yml after deploying
Browse files Browse the repository at this point in the history
Webpanel is displaying incorrect information because the changelog
is only really built before the milestones are updated.
  • Loading branch information
Cyberboss committed Sep 15, 2023
1 parent c8967ec commit d3c8594
Showing 1 changed file with 47 additions and 3 deletions.
50 changes: 47 additions & 3 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ jobs:
with:
ref: "refs/pull/${{ github.event.number }}/merge"

- name: gh-pages Clone
run: git clone -b gh-pages --single-branch "https://[email protected]/tgstation/tgstation-server" $HOME/tgsdox

- name: Restore
run: dotnet restore

- name: Build ReleaseNotes
run: dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj

- name: gh-pages Clone
run: git clone -b gh-pages --single-branch "https://[email protected]/tgstation/tgstation-server" $HOME/tgsdox

- name: Build Changelog (Incremental)
run: |
mv $HOME/tgsdox/changelog.yml ./ 2>/dev/null
Expand Down Expand Up @@ -1646,6 +1646,50 @@ jobs:
asset_name: tgstation-server-installer.exe
asset_content_type: application/octet-stream

changelog-regen:
name: Regenerate Changelog
runs-on: ubuntu-latest
needs: deploy-tgs
if: (!(cancelled() || failure()) && needs.deploy-tgs.result == 'success')
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ env.TGS_DOTNET_VERSION }}

- name: Checkout
uses: actions/checkout@v3

- name: Restore
run: dotnet restore

- name: Build ReleaseNotes
run: dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj

- name: gh-pages Clone
run: git clone -b gh-pages --single-branch "https://[email protected]/tgstation/tgstation-server" $HOME/tgsdox

- name: Build Changelog (Incremental)
run: |
mv $HOME/tgsdox/changelog.yml ./ 2>/dev/null
dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --generate-full-notes
- name: gh-pages Push
run: |
pushd $HOME/tgsdox
rm -f changelog.yml
popd
sudo mv changelog.yml $HOME/tgsdox/
cd $HOME/tgsdox
git config --global push.default simple
git config user.name "tgstation-server"
git config user.email "[email protected]"
git add changelog.yml
echo "Committing..."
git diff-index --quiet HEAD || git commit -m "Regenerate changelog post deploy for workflow run ${{ github.run_number }}" -m "Commit: ${{ github.event.head_commit.id }}"
echo "Pushing..."
git push -f "https://${{ secrets.DEV_PUSH_TOKEN }}@github.com/tgstation/tgstation-server" 2>&1
deploy-docker:
name: Deploy TGS (Docker)
needs: deploy-tgs
Expand Down

0 comments on commit d3c8594

Please sign in to comment.