Last active
February 11, 2021 02:30
-
-
Save KinoAR/4f1497f6dae2f22f6f8c682b140c8776 to your computer and use it in GitHub Desktop.
Automatic Build File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: Build Game | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
with: | |
repository: ${{ github.repository }} | |
ref: gh-pages | |
# Runs a single command using the runners shell | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 12.x | |
- name: Merge recent changes | |
run: | | |
echo "Merging recent changes" | |
git config --global user.name "username" | |
git config --global user.email "youremail@email.com" | |
git fetch | |
git pull | |
git branch | |
git merge origin/master --allow-unrelated-histories -X theirs || true | |
git commit -m "Update build" || true | |
# Runs a single command using the runners shell | |
- name: npm install | |
run: npm install | |
# Install Lix Globally | |
- name: install lix globally | |
run: npm install --global lix | |
# Downloads lix dependencies | |
- name: lix setup haxe | |
run: lix install haxe 4.1.5 | |
- name: lix setup scope | |
run: lix scope create | |
- name: lix use stable haxe version | |
run: lix use haxe 4.1.5 | |
- name: lix download | |
run: lix download | |
# Installs Lime | |
- name: lix install lime | |
run: lix install haxelib:lime | |
# Runs a single command using the runners shell | |
- name: Build Game | |
run: haxelib run lime build html5 | |
# Runs a single command using the runners shell | |
- name: Create Game | |
run: npm run gen:game | |
- name: Push Game to gh-pages branch | |
run: | | |
echo "Pushing to Gh-pages" | |
git config --global user.name "username" | |
git config --global user.email "youremail@email.com" | |
git add -A || true | |
git commit -m "Update game website" || true | |
git push || true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment