Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
name: OoT3DR Checks

env:
# These are used automatically by git
GIT_AUTHOR_NAME: ${{ github.actor }}
GIT_AUTHOR_EMAIL: ${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com
GIT_COMMITTER_NAME: GitHub Actions
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com

on:
pull_request:

Expand All @@ -10,7 +17,7 @@ jobs:

steps:
- name: Checkout Project
uses: actions/checkout@v4.1.3
uses: actions/checkout@v6.0.2

- name: Format Project
uses: DoozyX/clang-format-lint-action@v0.15
Expand All @@ -27,9 +34,27 @@ jobs:

steps:
- name: Checkout Project
uses: actions/checkout@v4.1.3
uses: actions/checkout@v6.0.2

- name: Set Env Vars
shell: bash
run: |
pr_number=$(echo ${{ github.ref }} | cut -d / -f 3)
echo pr_number="$pr_number" | tee -a $GITHUB_ENV
short_sha=${GITHUB_SHA::6}
echo short_sha="$short_sha" | tee -a $GITHUB_ENV
echo artifact_name=OoT3D_Randomizer_PR"$pr_number"_"$short_sha" | tee -a $GITHUB_ENV

- name: Compile Project
env:
GITHUB_BUILD_TYPE: "PR${{ env.pr_number }}"
run: |
chmod +x write_version.sh
make -j
mv -v OoT3D_Randomizer.3dsx ${{ env.artifact_name }}.3dsx

- name: Upload Artifact
uses: actions/upload-artifact@v6
with:
name: ${{ env.artifact_name }}
path: ${{ env.artifact_name }}.3dsx
31 changes: 17 additions & 14 deletions .github/workflows/clang_format_code.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: Code Linting On Push To Main and Development
name: Code Linting

env:
# These are used automatically by git
GIT_AUTHOR_NAME: ${{ github.actor }}
GIT_AUTHOR_EMAIL: ${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com
GIT_COMMITTER_NAME: GitHub Actions
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com

on:
workflow_dispatch:
Expand All @@ -9,12 +15,12 @@ on:
- development

jobs:
auto-formatter-on-main:
name: Auto Format Code and Commit If Any Changes
auto-formatter:
name: Auto Format Code
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4.1.3
- uses: actions/checkout@v6.0.2

- uses: DoozyX/clang-format-lint-action@v0.15
with:
Expand All @@ -24,13 +30,10 @@ jobs:
style: file
inplace: True

- uses: EndBug/add-and-commit@v9.1.4
with:
committer_name: GitHub Actions
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
message: |
Run automatic format script as code does not match clang format rules.

Developers please rebase to avoid merge conflicts!
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Add and commit
run: |
git add --all
if ! git diff --cached --quiet; then
git commit -m "Auto-format code to match clang rules"
git push
fi
39 changes: 28 additions & 11 deletions .github/workflows/create_build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
name: OoT3DR Builds

env:
# These are used automatically by git
GIT_AUTHOR_NAME: ${{ github.actor }}
GIT_AUTHOR_EMAIL: ${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com
GIT_COMMITTER_NAME: GitHub Actions
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com

on:
workflow_dispatch:
inputs:
Expand All @@ -20,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4.1.3
uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- name: Get Last Nightly
Expand All @@ -29,7 +36,7 @@ jobs:
echo "last_nightly=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV
- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@v4.3.1
uses: metcalfc/changelog-generator@v4.7.0
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
base-ref: ${{ env.last_nightly }}
Expand All @@ -41,12 +48,14 @@ jobs:
needs: get-changelog
name: Build CIA and 3DSX Files
runs-on: ubuntu-latest
permissions:
contents: write
container:
image: ghcr.io/z3dr/randotools:latest

steps:
- name: Checkout Project
uses: actions/checkout@v4.1.3
uses: actions/checkout@v6.0.2

- name: Run Build Script
env:
Expand All @@ -58,7 +67,7 @@ jobs:

- if: ${{ github.event.inputs.build_type == 'Nightly' }}
name: Create Pre-release
uses: ncipollo/release-action@v1.14.0
uses: ncipollo/release-action@v1.21.0
with:
token: "${{ secrets.GITHUB_TOKEN }}"
artifacts: "OoT3D_Randomizer.cia,OoT3D_Randomizer.3dsx,cia.png,3dsx.png"
Expand All @@ -81,7 +90,7 @@ jobs:

- if: ${{ github.event.inputs.build_type == 'Release' }}
name: Create Release
uses: ncipollo/release-action@v1.14.0
uses: ncipollo/release-action@v1.21.0
with:
token: "${{ secrets.GITHUB_TOKEN }}"
artifacts: "OoT3D_Randomizer.cia,OoT3D_Randomizer.3dsx,cia.png,3dsx.png"
Expand All @@ -101,6 +110,7 @@ jobs:
![3DSX Download](https://github.com/${{ github.repository }}/releases/download/${{ env.tag_name }}/3dsx.png)

deploy-gist:
if: ${{ github.repository == 'gamestabled/OoT3D_Randomizer' }}
needs: build-cia-3dsx
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -431,9 +441,16 @@ jobs:
done

- name: Deploy to Gist
uses: exuanbo/actions-deploy-gist@v1.1.4
with:
token: ${{ secrets.TOKEN }}
gist_id: fa5ea9b42b99377c63bede1cf8ddfdad
gist_file_name: OoT3DR.unistore
file_path: ./OoT3DR.unistore
env:
GIST_ID: fa5ea9b42b99377c63bede1cf8ddfdad
GIST_FILE_NAME: OoT3DR.unistore
GIST_ACCESS_TOKEN: ${{ secrets.TOKEN }}
run: |
git clone https://$GIST_ACCESS_TOKEN@gist.github.com/$GIST_ID.git gist
cp ./$GIST_FILE_NAME ./gist/
cd gist
git add --all
if ! git diff --cached --quiet; then
git commit -m "Update UniStore"
git push
fi