Skip to content

perimeter - Switch to vcpkg (#956) #1468

perimeter - Switch to vcpkg (#956)

perimeter - Switch to vcpkg (#956) #1468

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@v11
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 }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
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: luxtorpeda-dev/build-number@v5
with:
token: ${{ secrets.github_token }}
prefix: ${{needs.findengine.outputs.engine}}
- name: Create Release
id: create_release
uses: luxtorpeda-dev/create-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.findengine.outputs.engine }}-${{ steps.buildnumber.outputs.build_number }}
release_name: ${{ needs.findengine.outputs.engine }} Version ${{ steps.buildnumber.outputs.build_number }}
draft: false
prerelease: false
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: Upload Release Asset
id: upload-release-asset
uses: luxtorpeda-dev/upload-release-asset@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.finddeploy.outputs.upload_url }}
asset_path: "dist/${{needs.findengine.outputs.engine}}/${{ matrix.name }}${{ matrix.extension }}"
asset_name: "${{ matrix.name }}-${{ needs.finddeploy.outputs.build_number }}${{ matrix.extension }}"
asset_content_type: application/x-xz
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@v12
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: luxtorpeda-dev/write-file-action@v3
with:
path: metadata/packagessniper_v2.hash
contents: ${{ steps.generatehash.outputs.hash }}
write-mode: overwrite
- name: Write Packages Hash 256
uses: luxtorpeda-dev/write-file-action@v3
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