From 3467e47322a3e727a025bddbc31c06014c3228ee Mon Sep 17 00:00:00 2001 From: xdpirate <1757462+xdpirate@users.noreply.github.com> Date: Mon, 20 Nov 2023 03:33:10 +0100 Subject: [PATCH] Add action to build main on push --- .github/workflows/release-main.yml | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/release-main.yml diff --git a/.github/workflows/release-main.yml b/.github/workflows/release-main.yml new file mode 100644 index 0000000..5d78d9f --- /dev/null +++ b/.github/workflows/release-main.yml @@ -0,0 +1,34 @@ +name: Build and publish latest commit +on: + push: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO_OWNER: xdpirate + steps: + - name: Generate short sha + uses: benjlevesque/short-sha@v2.2 + id: short-sha + with: + length: 7 + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Zip repo + uses: montudor/action-zip@v1 + with: + args: zip -qq -r GameHorizon-${{ steps.short-sha.outputs.sha }}.zip . + - name: Upload release + uses: ncipollo/release-action@v1.12.0 + with: + artifacts: "GameHorizon-${{ steps.short-sha.outputs.sha }}.zip" + generateReleaseNotes: true + makeLatest: true + name: GameHorizon-${{ steps.short-sha.outputs.sha }} + tag: ${{ steps.short-sha.outputs.sha }} + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file