Subversion Repositories Krakow BASIC

Rev

Rev 19 | Rev 21 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

# $Id$

name: "Build Krakow BASIC"

on:
  workflow_dispatch:
  push:

concurrency:
  group: "build"
  cancel-in-progress: true

jobs:
  build-c64:
    name: "Build for Commodore 64"
    runs-on: ubuntu-latest

    permissions:
      contents: write

    steps:
    - name: Checkout
      uses: actions/checkout@v4
    - name: Install packages
      run: sudo apt-get install cc65
    - name: Make sure it is clean
      run: make clean PLATFORM=c64
    - name: Make
      run: make PLATFORM=c64
    - name: Rename
      run: cp BASIC/krakow.80 krakow-c64.80
    - name: Upload artifact
      uses: actions/upload-artifact@v4
      with:
        name: build-c64
        path: krakow-c64.80

  build-arduino:
    name: "Build for Arduino"
    runs-on: ubuntu-latest

    permissions:
      contents: write

    steps:
    - name: Checkout
      uses: actions/checkout@v4
    - name: Install packages
      run: sudo apt-get install gcc-avr avr-libc
    - name: Make sure it is clean
      run: make clean PLATFORM=arduino
    - name: Make
      run: make PLATFORM=c64
    - name: Rename
      run: cp BASIC/krakow.hex krakow-arduino.hex
    - name: Upload artifact
      uses: actions/upload-artifact@v4
      with:
        name: build-arduino
        path: krakow-arduino.hex

  release:
    name: "Release"
    runs-on: ubuntu-latest

    permissions:
      contents: write

    needs: [build-c64, build-arduino]

    steps:
    - name: Checkout
      uses: actions/checkout@v4
    - name: Download from build-c64
      uses: actions/download-artifact@v4
      with:
        name: build-c64
    - name: Download from build-arduino
      uses: actions/download-artifact@v4
      with:
        name: build-arduino
    - name: Delete old release
      run: gh release delete "$(make get-version)" --cleanup-tag -y || true
      env:
        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    - name: Release
      run: gh release create -t "v$(make get-version)" "$(make get-version)" krakow-c64.80 krakow-arduino.hex -n "Version \`$(make get-version)\` was build in this release"
      env:
        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}