diff --git a/.github/workflows/build-bin.yml b/.github/workflows/build-bin.yml new file mode 100644 index 00000000..70ccaf2f --- /dev/null +++ b/.github/workflows/build-bin.yml @@ -0,0 +1,70 @@ +name: Release build + +on: + push: + tags: + - 'v*' + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Check out the code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y libtalloc-dev + + - name: Build the project + run: | + make -C src loader.elf loader-m32.elf build.h + make -C src proot + + - name: Run the test suite + run: make -C test + if: false + + - name: Create a package + run: | + mv src/proot ./proot + tar -zcvf ./proot.tar.gz proot + ls -lhrt + + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: dist + path: proot.tar.gz + + release: + needs: build + runs-on: ubuntu-20.04 + steps: + - name: Download Artifact + uses: actions/download-artifact@v2 + with: + name: dist + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CURRENT_DATE: ${{ github.event.push.timestamp }} + with: + tag_name: ${{ github.ref_name }} + release_name: Release ${{ github.ref_name }} + draft: false + prerelease: false + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./proot.tar.gz + asset_name: proot.tar.gz + asset_content_type: application/octet-stream \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c0f4c8b7..3176de2f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,7 @@ name: build on: push: branches: - - master + - notmaster pull_request: types: [opened, synchronize, reopened] diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml new file mode 100644 index 00000000..c89be255 --- /dev/null +++ b/.github/workflows/nightly-build.yml @@ -0,0 +1,71 @@ +name: Nightly build + +on: + push: + branches: + - build-01 + +jobs: + build: + if: true + runs-on: ubuntu-20.04 + steps: + - name: Check out the code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y libtalloc-dev + + - name: Build the project + run: | + make -C src loader.elf loader-m32.elf build.h + make -C src proot + + - name: Run the test suite + run: make -C test + if: true + + - name: Create a package + run: | + mv src/proot ./proot + tar -zcvf ./proot.tar.gz proot + ls -lhrt + + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: dist + path: proot.tar.gz + + release: + needs: build + runs-on: ubuntu-20.04 + steps: + - name: Download Artifact + uses: actions/download-artifact@v2 + with: + name: dist + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CURRENT_DATE: ${{ github.event.push.timestamp }} + with: + tag_name: nightly-${{ github.run_number }} + release_name: Nightly Build ${{ env.CURRENT_DATE }} + draft: false + prerelease: true + - name: Upload Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./proot.tar.gz + asset_name: proot.tar.gz + asset_content_type: application/octet-stream \ No newline at end of file