Fix ReleaseNotes build [APIDeploy][DMDeploy] #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Sync spacestation13/tgstation-server' | |
on: | |
push: | |
branches: | |
- dev | |
tags: | |
- '*' | |
workflow_dispatch: | |
env: | |
TGS_DOTNET_VERSION: 8 | |
TGS_DOTNET_QUALITY: ga | |
jobs: | |
fork-sync: | |
name: Fork Sync | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' | |
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} | |
- name: Build Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: temp_workspace | |
- name: Restore | |
run: | | |
cd temp_workspace | |
dotnet restore | |
- name: Build ReleaseNotes | |
run: | | |
cd temp_workspace | |
dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj | |
- name: Generate App Token | |
run: | | |
cd temp_workspace | |
dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --token-output-file ${{ runner.temp }}/installation_secret.txt ${{ secrets.TGS_CI_GITHUB_APP_TOKEN_BASE64 }} --spacestation13 | |
echo "INSTALLATION_TOKEN=$(cat ${{ runner.temp }}/installation_secret.txt)" >> $GITHUB_ENV | |
rm ${{ runner.temp }}/installation_secret.txt | |
env: | |
TGS_RELEASE_NOTES_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} | |
- name: Main Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
token: ${{ env.INSTALLATION_TOKEN }} | |
- 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: Generate App Token | |
run: | | |
dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --token-output-file ${{ runner.temp }}/installation_secret.txt ${{ secrets.TGS_CI_GITHUB_APP_TOKEN_BASE64 }} | |
echo "INSTALLATION_TOKEN=$(cat ${{ runner.temp }}/installation_secret.txt)" >> $GITHUB_ENV | |
rm ${{ runner.temp }}/installation_secret.txt | |
env: | |
TGS_RELEASE_NOTES_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} | |
- name: Push to Spacestation13 Fork | |
run: | | |
git config user.name "tgstation-server-ci[bot]" | |
git config user.email "161980869+tgstation-server-ci[bot]@users.noreply.github.com" | |
git push "https://tgstation-server-ci:${{ env.INSTALLATION_TOKEN }}@github.com/spacestation13/tgstation-server" | |
git push --tags "https://tgstation-server-ci:${{ env.INSTALLATION_TOKEN }}@github.com/spacestation13/tgstation-server" |