toaruos/.github/workflows/build.yml

50 lines
1.6 KiB
YAML
Raw Normal View History

on: [push, workflow_dispatch]
name: Build Image
2020-12-08 15:52:04 +03:00
jobs:
build-image:
runs-on: ubuntu-20.04
2020-12-08 15:52:04 +03:00
steps:
- name: Clone Repository
uses: actions/checkout@v2
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
- name: Upload Branch Image
uses: actions/upload-artifact@v2
with:
2021-05-31 04:47:02 +03:00
name: build
path: |
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