Release 20231006 #44
Workflow file for this run
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
on: | |
push: | |
tags: | |
- '*' | |
workflow_dispatch: | |
name: pu32-toolchain | |
jobs: | |
job0: | |
name: Release | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository and submodules | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Build project | |
working-directory: ../ | |
run: | | |
sudo ln -snf /bin/bash /bin/sh | |
sudo mount --bind /${PWD} /opt/ | |
sudo mkdir -p /opt/pu32-toolchain/ | |
sudo chown ${UID} /opt/pu32-toolchain/ | |
PATH="${PATH}:/opt/pu32-toolchain/bin" make USETAR=1 -f pu32/makefile > pu32/build.log | |
PATH="${PATH}:/opt/pu32-toolchain/bin" pu32-mksocimg -k pu32-vmlinux.bin -r pu32-rootfs.ext2 pu32.img | |
xz pu32-vmlinux.elf pu32-vmlinux.bin pu32-rootfs.ext2 pu32.img | |
mv *.xz pu32/ | |
- name: Save build.log | |
uses: actions/upload-artifact@v2 | |
with: | |
path: build.log | |
name: build.log | |
- name: Create Release | |
if: startsWith(github.ref, 'refs/tags/') | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Save pu32-toolchain.tar.xz | |
if: startsWith(github.ref, 'refs/heads/') | |
uses: actions/upload-artifact@v2 | |
with: | |
path: pu32-toolchain.tar.xz | |
name: pu32-toolchain.tar.xz | |
- name: Upload pu32-toolchain.tar.xz | |
if: startsWith(github.ref, 'refs/tags/') | |
id: upload-pu32-toolchain-tar-xz | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: pu32-toolchain.tar.xz | |
asset_name: pu32-toolchain.tar.xz | |
asset_content_type: application/tar+xz | |
- name: Save pu32-vmlinux.elf.xz | |
if: startsWith(github.ref, 'refs/heads/') | |
uses: actions/upload-artifact@v2 | |
with: | |
path: pu32-vmlinux.elf.xz | |
name: pu32-vmlinux.elf.xz | |
- name: Upload pu32-vmlinux.elf.xz | |
if: startsWith(github.ref, 'refs/tags/') | |
id: upload-vmlinux-xz | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: pu32-vmlinux.elf.xz | |
asset_name: pu32-vmlinux.elf.xz | |
asset_content_type: application/x-xz | |
- name: Save pu32-vmlinux.bin.xz | |
if: startsWith(github.ref, 'refs/heads/') | |
uses: actions/upload-artifact@v2 | |
with: | |
path: pu32-vmlinux.bin.xz | |
name: pu32-vmlinux.bin.xz | |
- name: Upload pu32-vmlinux.bin.xz | |
if: startsWith(github.ref, 'refs/tags/') | |
id: upload-vmlinux-bin-xz | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: pu32-vmlinux.bin.xz | |
asset_name: pu32-vmlinux.bin.xz | |
asset_content_type: application/x-xz | |
- name: Save pu32-rootfs.ext2.xz | |
if: startsWith(github.ref, 'refs/heads/') | |
uses: actions/upload-artifact@v2 | |
with: | |
path: pu32-rootfs.ext2.xz | |
name: pu32-rootfs.ext2.xz | |
- name: Upload pu32-rootfs.ext2.xz | |
if: startsWith(github.ref, 'refs/tags/') | |
id: upload-rootfs-ext2-xz | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: pu32-rootfs.ext2.xz | |
asset_name: pu32-rootfs.ext2.xz | |
asset_content_type: application/x-xz | |
- name: Save pu32.img.xz | |
if: startsWith(github.ref, 'refs/heads/') | |
uses: actions/upload-artifact@v2 | |
with: | |
path: pu32.img.xz | |
name: pu32.img.xz | |
- name: Upload pu32.img.xz | |
if: startsWith(github.ref, 'refs/tags/') | |
id: upload-vmlinux-img-xz | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: pu32.img.xz | |
asset_name: pu32.img.xz | |
asset_content_type: application/x-xz |