diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 636773a..a54bc8e 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -2,8 +2,7 @@ name: Package on: push: - schedule: - - cron: '0 0 1 * *' # every month + jobs: build: runs-on: ubuntu-latest @@ -36,8 +35,9 @@ jobs: run: | bash scripts/package.sh - - name: Upload Artifacts - uses: actions/upload-artifact@master + - name: Release + uses: softprops/action-gh-release@v2 with: - name: Randomizer-${{env.PLUGIN_VERSION}}.${{env.PLUGIN_VERSION_REVISION}} - path: ./build/package + files: build/Randomizer-${{ env.PLUGIN_VERSION }}.${{ env.PLUGIN_VERSION_REVISION }}.zip + tag_name: ${{ env.PLUGIN_VERSION }}.${{ env.PLUGIN_VERSION_REVISION }} + generate_release_notes: true diff --git a/README.md b/README.md index c0d0ba4..822509e 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,7 @@ Team Fortress 2 plugin that randomizes player loadout in any imaginable combinat Supports all TF2 stock gamemodes excluding Mann Vs Machine, allow servers using ConVars to randomize specific players by whatever loadouts from whatever events. ## Builds -All builds can be found [here](https://github.com/FortyTwoFortyTwo/Randomizer/actions?query=workflow%3APackage+branch%3Amaster). -To download latest build version, select latest package then "Artifacts" section underneath. +All builds can be found in [releases](https://github.com/FortyTwoFortyTwo/Randomizer/releases) page, auto-built on every commits done in master branch. ## Requirements - SourceMod 1.11 diff --git a/scripts/package.sh b/scripts/package.sh index 4b66128..a465a0e 100644 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -11,4 +11,8 @@ cp -r addons/sourcemod/plugins/randomizer.smx package/addons/sourcemod/plugins cp -r ../configs/randomizer package/addons/sourcemod/configs cp -r ../gamedata/randomizer.txt package/addons/sourcemod/gamedata cp -r ../translations package/addons/sourcemod -cp -r ../LICENSE package \ No newline at end of file +cp -r ../LICENSE package + +# Create ZIP file +cd package +zip -r ../Randomizer-$PLUGIN_VERSION.$PLUGIN_VERSION_REVISION.zip * \ No newline at end of file