Merge pull request #8 from WaberZhuang/master #35
This file contains hidden or 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
name: latest-release | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build Release Library | |
runs-on: ubuntu-latest | |
container: ubuntu:18.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
shell: bash | |
run: | | |
apt update -y | |
apt install -y sudo build-essential | |
./build.sh | |
- name: Upload build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: builds | |
path: build/libext2fs.tar.gz | |
build-on-aarch64: | |
name: Build Release Library For AArch64 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: uraimo/run-on-arch-action@v2 | |
name: Build on AArch64 | |
id: build | |
with: | |
arch: aarch64 | |
distro: ubuntu18.04 | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
dockerRunArgs: | | |
--volume "${{github.workspace}}:/build_aarch64" | |
shell: /bin/bash | |
install: | | |
apt-get update -y | |
apt-get install -y sudo | |
apt-get install -y build-essential | |
run: | | |
cd /build_aarch64 | |
gcc --version | |
./build.sh | |
- name: Upload build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: builds | |
path: ${{github.workspace}}/build/libext2fs*.tar.gz | |
release: | |
name: Create Latest Release | |
runs-on: ubuntu-latest | |
needs: [build, build-on-aarch64] | |
steps: | |
- name: Download builds | |
uses: actions/download-artifact@v3 | |
- name: Display structure of downloaded files | |
run: ls -l builds | |
- name: Create Release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest" | |
prerelease: false | |
title: "Development Build" | |
files: | | |
builds/libext2fs*.tar.gz | |