Skip to content
Open
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
24 changes: 20 additions & 4 deletions .github/workflows/build-jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,40 @@ jobs:

- name: Build sys-patch
run: |
make -C sys-patch -j$(nproc) dist && \

LIBNX_VER=$(dkp-pacman -Q libnx | cut -d' ' -f2 | cut -d- -f1)
echo "Detected libnx version: $LIBNX_VER"

if [ "$LIBNX_VER" = "4.11.0" ]; then
EXTRA_FLAGS="-DUSE_DEBUG_EVENT=1"
else
EXTRA_FLAGS=""
fi

make -C sys-patch -j$(nproc) dist EXTRA_FLAGS="$EXTRA_FLAGS" && \

VERSION=$(grep 'export VERSION := ' sys-patch/Makefile | cut -c 19-)
TAGVERSION=$(curl -s https://api.github.com/repos/$GITHUB_REPOSITORY/releases/latest | grep "tag_name" | head -1 | cut -d '"' -f 4)
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "TAGVERSION=${TAGVERSION}" >> $GITHUB_ENV
mv sys-patch/sys-patch.zip sys-patch/sys-patch-v$VERSION.zip
SHA256=$(sha256sum sys-patch/sys-patch-v$VERSION.zip)
echo "SHA256=${SHA256}" >> $GITHUB_ENV

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
include-hidden-files: true
overwrite: true
name: sys-patch-${{ env.VERSION }}
name: sys-patch-v${{ env.VERSION }}
path: sys-patch/out/

- name: Fetch git cli and upload release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "sys-patch/sys-patch-v${{ env.VERSION }}.zip"
echo "${{ env.SHA256 }}"
if [ ${{ env.TAGVERSION }} = v${{ env.VERSION }} ];
then echo "Tag version and makefile version are same, don't publish release, only artifact uploaded."
else
Expand All @@ -47,6 +63,6 @@ jobs:
chmod +x gh*/bin/gh && \
cp gh*/bin/gh /bin/gh && \
rm gh*.tar.gz && \
rm -rf gh*
gh release create v${{ env.VERSION }} sys-patch/sys-patch.zip --title "Sys-patch version ${{ env.VERSION }}" --repo github.com/$GITHUB_REPOSITORY
rm -rf gh* && \
gh release create v${{ env.VERSION }} sys-patch/sys-patch-v${{ env.VERSION }}.zip --title "Sys-patch version v${{ env.VERSION }}" --repo github.com/$GITHUB_REPOSITORY
fi
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ MAKEFILES := sysmod overlay
TARGETS := $(foreach dir,$(MAKEFILES),$(CURDIR)/$(dir))

# the below was taken from atmosphere + switch-examples makefile
export VERSION := 1.5.9
export VERSION := 1.6.0

ifneq ($(strip $(shell git symbolic-ref --short HEAD 2>/dev/null)),)
export GIT_BRANCH := $(shell git symbolic-ref --short HEAD)
Expand Down
Loading