forked from OpenRA/OpenRA
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #144 from dnqbob/rebase
Rebase & Optimize FireShrapnelWarhead
- Loading branch information
Showing
225 changed files
with
1,672 additions
and
2,940 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
name: Deploy Documentation | ||
|
||
on: | ||
push: | ||
branches: [ bleed ] | ||
tags: [ 'release-*', 'playtest-*' ] | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
|
@@ -12,15 +15,46 @@ permissions: | |
contents: read # to fetch code (actions/checkout) | ||
|
||
jobs: | ||
prepare: | ||
name: Prepare version strings | ||
if: github.repository == 'openra/openra' | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Prepare environment variables | ||
run: | | ||
if [ "${{ github.event_name }}" = "push" ]; then | ||
if [ "${{ github.ref_type }}" = "tag" ]; then | ||
VERSION_TYPE=`echo "${GITHUB_REF#refs/tags/}" | cut -d"-" -f1` | ||
echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
echo "VERSION_TYPE=$VERSION_TYPE" >> $GITHUB_ENV | ||
else | ||
echo "GIT_TAG=bleed" >> $GITHUB_ENV | ||
echo "VERSION_TYPE=bleed" >> $GITHUB_ENV | ||
fi | ||
else | ||
VERSION_TYPE=`echo "${{ github.event.inputs.tag }}" | cut -d"-" -f1` | ||
echo "GIT_TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV | ||
echo "VERSION_TYPE=$VERSION_TYPE" >> $GITHUB_ENV | ||
fi | ||
outputs: | ||
git_tag: ${{ env.GIT_TAG }} | ||
version_type: ${{ env.VERSION_TYPE }} | ||
|
||
wiki: | ||
name: Update Wiki | ||
if: github.repository == 'openra/openra' | ||
needs: prepare | ||
if: github.repository == 'openra/openra' && needs.prepare.outputs.version_type != 'bleed' | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Debug output | ||
run: | | ||
echo ${{ needs.prepare.outputs.git_tag }} | ||
echo ${{ needs.prepare.outputs.version_type }} | ||
- name: Clone Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.tag }} | ||
ref: ${{ needs.prepare.outputs.git_tag }} | ||
|
||
- name: Install .NET 6 | ||
uses: actions/setup-dotnet@v3 | ||
|
@@ -39,39 +73,39 @@ jobs: | |
path: wiki | ||
|
||
- name: Update Wiki (Playtest) | ||
if: startsWith(github.event.inputs.tag, 'playtest-') | ||
env: | ||
GIT_TAG: ${{ github.event.inputs.tag }} | ||
if: startsWith(needs.prepare.outputs.git_tag, 'playtest-') | ||
run: | | ||
./utility.sh all --settings-docs "${GIT_TAG}" > "wiki/Settings (playtest).md" | ||
./utility.sh all --settings-docs "${{ needs.prepare.outputs.git_tag }}" > "wiki/Settings (playtest).md" | ||
- name: Update Wiki (Release) | ||
if: startsWith(github.event.inputs.tag, 'release-') | ||
env: | ||
GIT_TAG: ${{ github.event.inputs.tag }} | ||
if: startsWith(needs.prepare.outputs.git_tag, 'release-') | ||
run: | | ||
./utility.sh all --settings-docs "${GIT_TAG}" > "wiki/Settings.md" | ||
./utility.sh all --settings-docs "${{ needs.prepare.outputs.git_tag }}" > "wiki/Settings.md" | ||
- name: Push Wiki | ||
env: | ||
GIT_TAG: ${{ github.event.inputs.tag }} | ||
run: | | ||
cd wiki | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Actions" | ||
git add --all | ||
git commit -m "Update auto-generated documentation for ${GIT_TAG}" | ||
git commit -m "Update auto-generated documentation for ${{ needs.prepare.outputs.git_tag }}" | ||
git push origin master | ||
docs: | ||
name: Update docs.openra.net | ||
needs: prepare | ||
if: github.repository == 'openra/openra' | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Debug output | ||
run: | | ||
echo ${{ needs.prepare.outputs.git_tag }} | ||
echo ${{ needs.prepare.outputs.version_type }} | ||
- name: Clone Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.tag }} | ||
ref: ${{ needs.prepare.outputs.git_tag }} | ||
|
||
- name: Install .NET 6 | ||
uses: actions/setup-dotnet@v3 | ||
|
@@ -82,62 +116,27 @@ jobs: | |
run: | | ||
make all | ||
- name: Clone docs.openra.net (Playtest) | ||
if: startsWith(github.event.inputs.tag, 'playtest-') | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: openra/docs | ||
token: ${{ secrets.DOCS_TOKEN }} | ||
path: docs | ||
ref: playtest | ||
|
||
- name: Clone docs.openra.net (Release) | ||
if: startsWith(github.event.inputs.tag, 'release-') | ||
# version_type is release/playtest/bleed - the name of the target branch. | ||
- name: Clone docs.openra.net | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: openra/docs | ||
token: ${{ secrets.DOCS_TOKEN }} | ||
path: docs | ||
ref: release | ||
ref: ${{ needs.prepare.outputs.version_type }} | ||
|
||
- name: Update docs.openra.net (Playtest) | ||
if: startsWith(github.event.inputs.tag, 'playtest-') | ||
env: | ||
GIT_TAG: ${{ github.event.inputs.tag }} | ||
run: | | ||
./utility.sh all --docs "${GIT_TAG}" | python3 ./packaging/format-docs.py > "docs/api/traits.md" | ||
./utility.sh all --weapon-docs "${GIT_TAG}" | python3 ./packaging/format-docs.py > "docs/api/weapons.md" | ||
./utility.sh all --sprite-sequence-docs "${GIT_TAG}" | python3 ./packaging/format-docs.py > "docs/api/sprite-sequences.md" | ||
./utility.sh all --lua-docs "${GIT_TAG}" > "docs/api/lua.md" | ||
- name: Update docs.openra.net (Release) | ||
if: startsWith(github.event.inputs.tag, 'release-') | ||
env: | ||
GIT_TAG: ${{ github.event.inputs.tag }} | ||
- name: Generate docs files | ||
run: | | ||
./utility.sh all --docs "${GIT_TAG}" | python3 ./packaging/format-docs.py > "docs/api/traits.md" | ||
./utility.sh all --weapon-docs "${GIT_TAG}" | python3 ./packaging/format-docs.py > "docs/api/weapons.md" | ||
./utility.sh all --sprite-sequence-docs "${GIT_TAG}" | python3 ./packaging/format-docs.py > "docs/api/sprite-sequences.md" | ||
./utility.sh all --lua-docs "${GIT_TAG}" > "docs/api/lua.md" | ||
- name: Commit docs.openra.net | ||
env: | ||
GIT_TAG: ${{ github.event.inputs.tag }} | ||
./utility.sh all --docs "${{ needs.prepare.outputs.git_tag }}" | python3 ./packaging/format-docs.py > "docs/api/traits.md" | ||
./utility.sh all --weapon-docs "${{ needs.prepare.outputs.git_tag }}" | python3 ./packaging/format-docs.py > "docs/api/weapons.md" | ||
./utility.sh all --sprite-sequence-docs "${{ needs.prepare.outputs.git_tag }}" | python3 ./packaging/format-docs.py > "docs/api/sprite-sequences.md" | ||
./utility.sh all --lua-docs "${{ needs.prepare.outputs.git_tag }}" > "docs/api/lua.md" | ||
- name: Update docs.openra.net | ||
run: | | ||
cd docs | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Actions" | ||
git add api/*.md | ||
git commit -m "Update auto-generated documentation for ${GIT_TAG}" | ||
- name: Push docs.openra.net (Release) | ||
if: startsWith(github.event.inputs.tag, 'release-') | ||
run: | | ||
cd docs | ||
git push origin release | ||
- name: Push docs.openra.net (Playtest) | ||
if: startsWith(github.event.inputs.tag, 'playtest-') | ||
run: | | ||
cd docs | ||
git push origin playtest | ||
git commit -m "Update auto-generated documentation for ${{ needs.prepare.outputs.git_tag }}" | ||
git push origin ${{ needs.prepare.outputs.version_type }} |
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
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
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
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
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
Oops, something went wrong.