Subversion Repositories Krakow BASIC

Rev

Rev 23 | Rev 25 | 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-a800xl:
    name: "Build for Atari 800 XL"
    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=a800xl
    - name: Make
      run: make PLATFORM=a800xl
    - name: Rename
      run: cp BASIC/krakow krakow-a800xl
    - name: Upload artifact
      uses: actions/upload-artifact@v4
      with:
        name: build-a800xl
        path: krakow-a800xl

  build-pet:
    name: "Build for Commodore PET"
    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=pet
    - name: Make
      run: make PLATFORM=pet
    - name: Rename
      run: cp BASIC/krakow.prg krakow-pet.prg
    - name: Upload artifact
      uses: actions/upload-artifact@v4
      with:
        name: build-pet
        path: krakow-pet.prg

  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=arduino
    - 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, build-a800xl, build-pet]

    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-a800xl
      uses: actions/download-artifact@v4
      with:
        name: build-a800xl
    - name: Download from build-pet
      uses: actions/download-artifact@v4
      with:
        name: build-pet
    - 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 krakow-a800xl krakow-pet.prg -n "Version \`$(make get-version)\` was build in this release"
      env:
        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}