Adding level selection and level progression #4
Workflow file for this run
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
name: build | |
on: | |
push: | |
branches: [ "master", "develop" ] | |
tags: | |
- 'v*' | |
pull_request: | |
branches: [ "master", "develop" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: sudo apt install -y build-essential nasm | |
- name: Build | |
run: cd src && make | |
- name: Upload executable | |
uses: actions/upload-artifact@v3 | |
with: | |
name: TETRIX.COM | |
path: src/tetrix.com | |
# (optional) Create release | |
create-release: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
build-img: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Install dependencies | |
run: sudo apt install -y build-essential nasm | |
- uses: actions/checkout@v3 | |
- name: Build floppy image | |
run: cd src && make && sudo bash makeimg.sh | |
- name: Upload floppy image | |
uses: actions/upload-artifact@v3 | |
with: | |
name: TETRIX.IMG | |
path: src/tetrix.img | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [build, create-release] | |
permissions: write-all | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: TETRIX.COM | |
path: ./ | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create-release.outputs.upload_url }} | |
asset_path: tetrix.com | |
asset_name: tetrix.com | |
asset_content_type: application/octet-stream | |
deploy-img: | |
runs-on: ubuntu-latest | |
needs: [build-img, create-release] | |
permissions: write-all | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: TETRIX.IMG | |
path: ./ | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create-release.outputs.upload_url }} | |
asset_path: tetrix.img | |
asset_name: tetrix.img | |
asset_content_type: application/octet-stream |