Build and release operating system with sjasmplus #1
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-system | |
run-name: Build and release operating system with sjasmplus | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
create-release: | |
runs-on: [ubuntu-latest] | |
container: nihirash/sjasmplus:x64 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Fix ownership | |
run: chown -R $(id -u):$(id -g) $PWD | |
- name: Build OS from sources using dockerized sjasmplus | |
run: (cd system && make) | |
- name: Pack release | |
run: (cd system && zip release.zip cpm.\$c ../drive_image/sdcard.zip) | |
- name: Read version | |
id: version | |
run: echo "version=$(cat system/.version)" >> $GITHUB_OUTPUT | |
- name: Release | |
id: create_release | |
uses: actions/create-release@v1 | |
with: | |
draft: false | |
prerelease: false | |
release_name: CI build ${{ steps.version.outputs.version }} | |
tag_name: ${{ steps.version.outputs.version }} | |
body_path: CHANGELOG.md | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Upload artifact | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: "./system/release.zip" | |
asset_name: "release.zip" | |
asset_content_type: "application/zip" | |