Skip to content

crispy-doom - Fix hexen #1531

crispy-doom - Fix hexen

crispy-doom - Fix hexen #1531

Workflow file for this run

name: Build Engine
on:
push:
branches: [ master ]
paths:
- 'engines/**'
jobs:
findengine:
runs-on: ubuntu-latest
outputs:
engine: ${{ steps.findname.outputs.engine }}
container: ${{ steps.findname.outputs.container }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Find Engine Name
id: findname
uses: luxtorpeda-dev/action-build-get-engine-name@v12
with:
token: ${{ secrets.GITHUB_TOKEN }}
build:
runs-on: ubuntu-latest
needs: findengine
outputs:
app_ids: ${{env.APP_IDS }}
container: ${{ needs.findengine.outputs.container }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: ./common/start_build.sh ${{needs.findengine.outputs.engine}}
- name: Package
run: ./common/package.sh ${{needs.findengine.outputs.engine}}
- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: dist
path: ./dist
finddeploy:
needs: [build, findengine]
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
build_number: ${{ steps.buildnumber.outputs.build_number }}
steps:
- name: Download Artifacts
uses: actions/download-artifact@v1
with:
name: dist
- name: Generate Matrix
id: matrix
uses: luxtorpeda-dev/action-build-generate-file-matrix@v4
with:
name: dist/${{needs.findengine.outputs.engine}}
- name: Generate build number
id: buildnumber
uses: onyxmueller/build-tag-number@v1
with:
token: ${{ secrets.github_token }}
prefix: ${{needs.findengine.outputs.engine}}
- name: Create Release
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.findengine.outputs.engine }}-${{ steps.buildnumber.outputs.build_number }}
name: ${{ needs.findengine.outputs.engine }} Version ${{ steps.buildnumber.outputs.build_number }}
draft: false
prerelease: false
generate_release_notes: true
deploy:
needs: [finddeploy, findengine]
runs-on: ubuntu-latest
strategy:
matrix: ${{fromJson(needs.finddeploy.outputs.matrix)}}
steps:
- name: Download Artifacts
uses: actions/download-artifact@v1
with:
name: dist
- name: Rename Artifact for Release Prep
run: mv "dist/${{needs.findengine.outputs.engine}}/${{ matrix.name }}${{ matrix.extension }}" "${{ matrix.name }}-${{ needs.finddeploy.outputs.build_number }}${{ matrix.extension }}"
- name: Update Release
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.findengine.outputs.engine }}-${{ needs.finddeploy.outputs.build_number }}
name: ${{ needs.findengine.outputs.engine }} Version ${{ needs.finddeploy.outputs.build_number }}
draft: false
prerelease: false
generate_release_notes: true
files: "${{ matrix.name }}-${{ needs.finddeploy.outputs.build_number }}${{ matrix.extension }}"
update_packages:
needs: [deploy, finddeploy, findengine, build]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: master
- name: Update packagessniper_v2.json
uses: luxtorpeda-dev/action-build-update-packages@v13
with:
matrix: ${{ needs.finddeploy.outputs.matrix }}
version: ${{ needs.finddeploy.outputs.build_number }}
app_ids: ${{ needs.build.outputs.app_ids }}
- name: Commit package.json
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add metadata/packagessniper_v2.json
git commit -m "Update packages.json for ${{ needs.findengine.outputs.engine }} version ${{ needs.finddeploy.outputs.build_number }}"
- name: Push Changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
- name: Generate Packages Runtime Hash
id: generatehash
uses: luxtorpeda-dev/action-build-generate-sha1-hash@v3
with:
file: metadata/packagessniper_v2.json
- name: Generate Packages Hash 256
id: generatehash256
uses: luxtorpeda-dev/action-build-generate-sha256-hash@v3
with:
file: metadata/packagessniper_v2.json
- name: Write Packages Hash
uses: DamianReeves/[email protected]
with:
path: metadata/packagessniper_v2.hash
contents: ${{ steps.generatehash.outputs.hash }}
write-mode: overwrite
- name: Write Packages Hash 256
uses: DamianReeves/[email protected]
with:
path: metadata/packagessniper_v2.hash256
contents: ${{ steps.generatehash256.outputs.hash }}
write-mode: overwrite
- name: Publish To Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./metadata
keep_files: true
external_repository: luxtorpeda-dev/luxtorpeda-dev.github.io
publish_branch: master