2020-12-08 16:00:38 +03:00
|
|
|
on: [push, workflow_dispatch]
|
2020-12-08 16:06:58 +03:00
|
|
|
name: Build Image
|
2020-12-08 15:52:04 +03:00
|
|
|
jobs:
|
|
|
|
build-image:
|
2020-12-08 16:06:58 +03:00
|
|
|
runs-on: ubuntu-20.04
|
2020-12-08 15:52:04 +03:00
|
|
|
steps:
|
|
|
|
- name: Clone Repository
|
|
|
|
uses: actions/checkout@v2
|
2020-12-08 16:52:43 +03:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-05-31 04:47:02 +03:00
|
|
|
- name: Clone Kuroko
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: kuroko-lang/kuroko
|
|
|
|
path: kuroko
|
2020-12-08 15:52:04 +03:00
|
|
|
- name: Pull Builder Image
|
2021-05-31 04:47:02 +03:00
|
|
|
run: docker pull toaruos/build-tools:1.99.x
|
2020-12-08 15:52:04 +03:00
|
|
|
- name: Run Builder
|
2021-05-31 04:47:02 +03:00
|
|
|
run: docker run -v ${GITHUB_WORKSPACE}:/root/misaka -w /root/misaka -e LANG=C.UTF-8 -t toaruos/build-tools:1.99.x util/build-in-docker.sh
|
2020-12-08 16:40:08 +03:00
|
|
|
- name: Upload Branch Image
|
2020-12-08 16:06:58 +03:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-05-31 04:47:02 +03:00
|
|
|
name: build
|
|
|
|
path: |
|
2021-06-14 05:59:30 +03:00
|
|
|
image.iso
|
2021-06-15 13:50:28 +03:00
|
|
|
- name: Draft Release notes
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
run: bash util/generate-release-notes.sh > notes.md
|
|
|
|
- name: Create Release
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
id: create_release
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tag_name: ${{ github.ref }}
|
|
|
|
release_name: ToaruOS ${{ github.ref }}
|
|
|
|
body_path: ./notes.md
|
|
|
|
draft: true
|
|
|
|
- name: Upload Release Image
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
asset_path: ./image.iso
|
|
|
|
asset_name: image.iso
|
|
|
|
asset_content_type: application/x-iso9660-image
|