Update CI.yml

This commit is contained in:
Aditya Garg 2022-10-18 22:04:10 +05:30 committed by GitHub
parent 80c5e2e932
commit db4df24314
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 10 deletions

View File

@ -21,7 +21,7 @@ jobs:
run: | run: |
VERSION=$(grep ^KERNEL_VERSION build.sh | head -n1| cut -d = -f2) VERSION=$(grep ^KERNEL_VERSION build.sh | head -n1| cut -d = -f2)
REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2) REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2)
echo "::set-output name=tag::${VERSION}-${REL}" echo "kerneltag=${VERSION}-${REL}" >> $GITHUB_ENV
sudo apt install git sudo apt install git
mkdir /tmp/artifacts mkdir /tmp/artifacts
git clone https://github.com/t2linux/T2-Ubuntu-Kernel.git git clone https://github.com/t2linux/T2-Ubuntu-Kernel.git
@ -38,7 +38,7 @@ jobs:
with: with:
files: | files: |
/tmp/artifacts/*.deb /tmp/artifacts/*.deb
tag_name: v${{ steps.build.outputs.tag }}-kernel tag_name: v${{ env.kerneltag }}-kernel
draft: false draft: false
prerelease: true prerelease: true
env: env:
@ -49,10 +49,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: Build - name: Build
run: | run: sudo ./build.sh
cd ${{ github.workspace }}
sudo rm -r ${{ github.workspace }}/T2-Ubuntu-Kernel
sudo ./build.sh
- name: print sha256sum - name: print sha256sum
run: cat output/sha256 run: cat output/sha256
@ -63,7 +60,7 @@ jobs:
VER=$(egrep ^KERNEL_VERSION build.sh|cut -d= -f2) VER=$(egrep ^KERNEL_VERSION build.sh|cut -d= -f2)
REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2) REL=$(grep "PKGREL=\d*" build.sh | cut -d = -f2)
echo Version is $VER echo Version is $VER
echo "::set-output name=tag::${VER}-${REL}" echo "isotag=${VER}-${REL}" >> $GITHUB_ENV
- name: Upload iso artifact - name: Upload iso artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@ -77,7 +74,7 @@ jobs:
Download all the artifacts, and put them in a folder Download all the artifacts, and put them in a folder
without other files. Then run:" without other files. Then run:"
unzip "*.z??.zip" unzip "*.z??.zip"
cat livecd-${{ steps.tag.outputs.tag }}-t2.z?? > cd.zip cat livecd-${{ env.isotag }}-t2.z?? > cd.zip
echo unzip cd.zip echo unzip cd.zip
EOF EOF
@ -86,7 +83,7 @@ jobs:
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:
files: ${{ github.workspace }}/*.iso files: ${{ github.workspace }}/*.iso
tag_name: v22.04-${{ steps.tag.outputs.tag }} tag_name: v22.04-${{ env.isotag }}
body_path: ${{ github.workspace }}/.github/workflows/instructions.txt body_path: ${{ github.workspace }}/.github/workflows/instructions.txt
draft: false draft: false
prerelease: false prerelease: false
@ -98,6 +95,6 @@ jobs:
uses: dev-drprasad/delete-tag-and-release@v0.2.0 uses: dev-drprasad/delete-tag-and-release@v0.2.0
with: with:
delete_release: true delete_release: true
tag_name: v${{ steps.build.outputs.tag }}-kernel tag_name: v${{ env.isotag }}-kernel
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}