mirror of
https://github.com/RetroDECK/MAME.git
synced 2024-11-22 20:55:38 +00:00
98 lines
3.3 KiB
YAML
98 lines
3.3 KiB
YAML
name: "Build MAME"
|
|
|
|
on:
|
|
push:
|
|
workflow_dispatch:
|
|
|
|
|
|
jobs:
|
|
|
|
Building_RetroDECK-MAME:
|
|
runs-on: mame
|
|
#runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
# Circumventing this bug: https://github.com/flatpak/flatpak-builder/issues/317
|
|
- name: Remove stuck mounts
|
|
run: sudo umount -f /home/ubuntu/mame-runner/_work/RetroDECK-MAME/RetroDECK-MAME/.flatpak-builder/rofiles/*
|
|
continue-on-error: true
|
|
|
|
- name: Clone repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: 'true'
|
|
token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
|
|
|
|
- name: "Install dependencies"
|
|
run: "automation_tools/install_dependencies.sh"
|
|
|
|
- name: "Creating MAME manifest"
|
|
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/update_mame_manifest.sh"
|
|
|
|
- name: "[DEBUG] Outputting manifest"
|
|
run: cat net.retrodeck.mame.yml
|
|
|
|
# - name: "Build flatpak"
|
|
# id: "flatpak-download"
|
|
# run: |
|
|
# flatpak-builder --user --force-clean \
|
|
# --install-deps-from=flathub \
|
|
# --install-deps-from=flathub-beta \
|
|
# --repo=${GITHUB_WORKSPACE}/mame-repo \
|
|
# "${GITHUB_WORKSPACE}"/mame-build-dir \
|
|
# net.retrodeck.mame.yml
|
|
|
|
# - name: Create Artifact for RetroDECK
|
|
# run: |
|
|
# tar -czf ${GITHUB_WORKSPACE}/RetroDECK-MAME-Artifact.tar.gz -C ${GITHUB_WORKSPACE}/mame-repo .
|
|
# hash=($(sha256sum ${GITHUB_WORKSPACE}/RetroDECK-MAME-Artifact.tar.gz))
|
|
# echo $hash > ${GITHUB_WORKSPACE}/RetroDECK-Artifact-cooker.sha
|
|
# mv -f RetroDECK-Artifact-cooker.* ${{ secrets.ARTIFACT_REPO }}
|
|
# continue-on-error: true
|
|
# timeout-minutes: 1440
|
|
|
|
- name: '[TEST] Create Artifact for RetroDECK'
|
|
run: |
|
|
touch ${GITHUB_WORKSPACE}/RetroDECK-MAME-Artifact.tar.gz
|
|
continue-on-error: true
|
|
timeout-minutes: 1440
|
|
|
|
- name: Set environment variable with current branch name
|
|
run: echo "GITHUB_REF_SLUG=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
|
|
|
|
- name: Get branch name
|
|
id: branch_name
|
|
#run: echo "BRANCH_NAME=$(echo $GITHUB_REF | sed 's|refs/heads/||')" >> $GITHUB_ENV
|
|
# TODO: I need to enhance this
|
|
run: echo "BRANCH_NAME=main" >> $GITHUB_ENV
|
|
|
|
- name: Get date
|
|
id: date
|
|
run: echo "DATE=$(date +'%d%m%y')" >> $GITHUB_ENV
|
|
|
|
- name: Publish the artifacts in a release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
tag: "${{env.BRANCH_NAME}}-${{env.DATE}}"
|
|
body: |
|
|
# Release Notes (Cooker)
|
|
These are the artifact of RetroDECK MAME, commit: ${{ github.event.repository.full_name }}@${{github.sha}}.
|
|
On branch [${{env.BRANCH_NAME}}](https://github.com/XargonWan/RetroDECK-MAME/tree/${{env.BRANCH_NAME}}).
|
|
|
|
artifacts: "RetroDECK-MAME-Artifact.tar.gz"
|
|
allowUpdates: true
|
|
makeLatest: true
|
|
token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
|
|
continue-on-error: true
|
|
|
|
- name: "Committing changes"
|
|
uses: EndBug/add-and-commit@v9.1.3
|
|
with:
|
|
message: '[AUTOMATED] Updating MAME after build [skip ci]'
|
|
github_token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
|
|
author_name: GitHub Actions
|
|
author_email: actions@github.com
|
|
|
|
|
|
|