mbp-ubuntu/.github/workflows/CI.yml

54 lines
1.9 KiB
YAML

---
name: CI
# yamllint disable-line rule:truthy
on:
[push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Configure variables
id: variables
run: |
KERNEL_VERSION=$(curl -Ls https://github.com/t2linux/T2-Ubuntu-Kernel/releases/ | grep deb | grep download | grep "${MBP_VERSION}" | cut -d'/' -f6 | head -n1 | cut -d'v' -f2)
echo "::set-output name=build::${KERNEL_VERSION}"
- name: Build
env:
KERNEL_VERSION: ${{ steps.variables.outputs.build }}
run: sudo ./build.sh
- name: print sha256sum
run: cat output/sha256
- name: Upload iso artifact
uses: actions/upload-artifact@v2
with:
name: mbp-ubuntu-${{ steps.variables.outputs.build }}
path: ${{ github.workspace }}/output/*
- name: Instructions for putting it back together
run: |
echo "${{ github.workspace }}Release.txt"
echo 'Download all the artifacts, and put them in a folder' > ${{ github.workspace }}Release.txt
echo 'without other files. Then run:' >> ${{ github.workspace }}Release.txt
echo '`unzip "*.z??.zip"`' >> ${{ github.workspace }}Release.txt
echo '`cat livecd-${{ steps.variables.outputs.build }}-mbp.z?? > cd.zip`' >> ${{ github.workspace }}Release.txt
echo '`unzip cd.zip`' >> ${{ github.workspace }}Release.txt
- name: Test release text
run: cat ${{ github.workspace }}Release.txt
- name: Release
if: github.ref == 'refs/heads/master'
uses: softprops/action-gh-release@v1
with:
files: ${{ github.workspace }}/output/*
body_path: ${{ github.workspace }}Release.txt
tag_name: v20.04-${{ steps.variables.outputs.build }}
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}