Skip to content

Commit

Permalink
Add GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MrBlue committed Oct 9, 2023
1 parent 613cd75 commit e84c303
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/prerelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build and Upload Bundles to S3

on:
push:
branches-ignore:
- master

jobs:
build:
name: Run Build
uses: OxideMod/Actions/.github/workflows/game-build.yaml@main
with:
game: "SevenDaysToDie"
branch-postfix: "-${{ github.ref_name }}"
secrets:
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}

deploy:
name: Deploy to S3
uses: OxideMod/Actions/.github/workflows/r2-publish.yaml@main
needs: build
with:
generate-filehash: true
secrets:
CLOUDFLARE_R2_KEY: ${{ secrets.CLOUDFLARE_R2_KEY }}
CLOUDFLARE_R2_SECRET: ${{ secrets.CLOUDFLARE_R2_SECRET }}
CLOUDFLARE_R2_ENDPOINT: ${{ secrets.CLOUDFLARE_R2_ENDPOINT }}
37 changes: 37 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and Create Release

on:
push:
branches:
- master

jobs:
build:
name: Run Build
uses: OxideMod/Actions/.github/workflows/game-build.yaml@main
with:
game: "SevenDaysToDie"
secrets:
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}

release:
name: Create Release
runs-on: ubuntu-22.04
needs: build
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: ${{ github.event.repository.name }}
path: artifacts

- name: Deploy to GitHub Releases
uses: softprops/action-gh-release@v1
with:
files: |
artifacts/Oxide.*.zip
tag_name: 2.0.${{ vars.VERSION }}
fail_on_unmatched_files: true
token: ${{ secrets.GITHUB_TOKEN }}
body: |
See https://umod.org/games/7-days-to-die for changes

0 comments on commit e84c303

Please sign in to comment.