diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml new file mode 100644 index 0000000..c83596a --- /dev/null +++ b/.github/workflows/package.yml @@ -0,0 +1,33 @@ +name: Package and Release + +on: + push: + tags: + - '*' # Run on any tag + workflow_dispatch: + +jobs: + build-and-package: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Make fab_package.sh executable + run: chmod +x fab_package.sh + + - name: Run packaging script + run: ./fab_package.sh + + - name: Upload SteamInputPlugin.zip as artifact + uses: actions/upload-artifact@v4 + with: + name: SteamInputPlugin + path: target/fab/SteamInputPlugin.zip + + - run: echo "RELEASE_TAG=$(git tag)" >>$GITHUB_ENV + - uses: ncipollo/release-action@v1 + with: + tag: ${{ env.RELEASE_TAG }} + artifacts: target/fab/SteamInputPlugin.zip + bodyFile: "README.md" \ No newline at end of file diff --git a/.gitignore b/.gitignore index c2a589d..fba630e 100644 --- a/.gitignore +++ b/.gitignore @@ -77,4 +77,6 @@ DerivedDataCache/* #env variables *.env -*env.bat \ No newline at end of file +*env.bat + +target/ \ No newline at end of file diff --git a/SteamInputPlugin.uproject b/SteamInputPlugin.uproject index 4896043..c6821b3 100644 --- a/SteamInputPlugin.uproject +++ b/SteamInputPlugin.uproject @@ -9,5 +9,6 @@ "Type": "Runtime", "LoadingPhase": "Default" } - ] + ], + "Plugins": [] } \ No newline at end of file diff --git a/fab_package.sh b/fab_package.sh new file mode 100755 index 0000000..8ece900 --- /dev/null +++ b/fab_package.sh @@ -0,0 +1,15 @@ +directories_to_keep="Config Content/Examples Plugins/SteamInputSimplePlugin/Config/\ + Plugins/SteamInputSimplePlugin/Content\ + Plugins/SteamInputSimplePlugin/Resources\ + Plugins/SteamInputSimplePlugin/Source\ + Plugins/SteamInputSimplePlugin/SteamInputSimplePlugin.uplugin\ + Source\ + SteamInputPlugin.uproject" + +zip -r -9 -X -q -o "SteamInputPlugin.zip" $directories_to_keep + +[ -d target ] && rm -r target + +mkdir -p target/fab + +mv "SteamInputPlugin.zip" target/fab/SteamInputPlugin.zip \ No newline at end of file