Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Unverified Commit bc9f84b0 authored by vedantparanjape's avatar vedantparanjape
Browse files

Due to succession of arm32 and amd64 build steps, even arm32 deb package was...

Due to succession of arm32 and amd64 build steps, even arm32 deb package was built with amd64 binaris, fixed this issue, created different jobs for different builds, stored their results in artifacts, and created new release in the 3rd job, which depended on first two build jobs
parent c07d74ec
Branches
Tags 1.0
No related merge requests found
......@@ -3,9 +3,9 @@ on:
types: build-deb-package
jobs:
build_simppru_debian_job:
build_amd64_debian_package:
runs-on: ubuntu-latest
name: This will build simppru debian packages
name: This will build simppru debian packages for amd64
steps:
- name: Checkout
uses: actions/checkout@v2
......@@ -13,18 +13,63 @@ jobs:
run: sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: build inside docker amd64
uses: ./.github/action_build_amd64
- name: postconfig
run: |
amd64__filename__=$(echo $(ls build | grep ..amd64.deb) | tr -d '\n')
echo "::set-env name=amd64__filename__::$amd64__filename__"
- name: upload amd64 package to artifacts
uses: actions/upload-artifact@v2
with:
name: amd64-package
path: ./build/${{ env.amd64__filename__ }}
build_arm32_debian_package:
runs-on: ubuntu-latest
name: This will build simppru debian package for arm32
steps:
- name: Checkout
uses: actions/checkout@v2
- name: preconfig
run: sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: build inside docker arm32
uses: ./.github/action_build_arm32
- name: postconfig
run: |
foo_filename__=$(echo $(ls build | grep ..amd64.deb) | tr -d '\n');name__=$(echo ${foo_filename__%-*} | tr -d '\n')
foo_filename_=$(echo $(ls build | grep ..amd64.deb) | tr -d '\n');version__name__=${foo_filename_#*-};version__=$(echo ${version__name__%-*} | tr -d '\n')
arm32__filename__=$(echo $(ls build | grep ..armhf.deb) | tr -d '\n')
amd64__filename__=$(echo $(ls build | grep ..amd64.deb) | tr -d '\n')
echo "::set-env name=arm32__filename__::$arm32__filename__"
- name: upload arm32 package to artifacts
uses: actions/upload-artifact@v2
with:
name: arm32-package
path: ./build/${{ env.arm32__filename__ }}
create_debian_package_release:
runs-on: ubuntu-latest
needs: [build_amd64_debian_package, build_arm32_debian_package]
name: This will create a new release, and upload both packages to it
steps:
- name: Download artifacts amd64
id: amd64-artifact-download
uses: actions/download-artifact@v2
with:
name: amd64-package
path: .
- name: Download artifacts arm32
id: arm32-artifact-download
uses: actions/download-artifact@v2
with:
name: arm32-package
path: .
- name: postconfig
run: |
foo_filename__=$(echo $(ls ${{steps.amd64-artifact-download.outputs.download-path}} | grep ..amd64.deb) | tr -d '\n');name__=$(echo ${foo_filename__%-*} | tr -d '\n')
foo_filename_=$(echo $(ls ${{steps.amd64-artifact-download.outputs.download-path}} | grep ..amd64.deb) | tr -d '\n');version__name__=${foo_filename_#*-};version__=$(echo ${version__name__%-*} | tr -d '\n')
arm32__filename__=$(echo $(ls ${{steps.amd64-artifact-download.outputs.download-path}} | grep ..armhf.deb) | tr -d '\n')
amd64__filename__=$(echo $(ls ${{steps.amd64-artifact-download.outputs.download-path}} | grep ..amd64.deb) | tr -d '\n')
echo "::set-env name=name__::$name__"
echo "::set-env name=version__::$version__"
echo "::set-env name=arm32__filename__::$arm32__filename__"
echo "::set-env name=amd64__filename__::$amd64__filename__"
echo "::set-env name=amd64__filename__::$amd64__filename__"
- name: Create Release
id: create_release
uses: actions/create-release@v1
......@@ -34,7 +79,7 @@ jobs:
tag_name: ${{ env.version__ }}
release_name: ${{ env.name__ }}
draft: false
prerelease: false
prerelease: false
- name: Upload amd64 Release Asset
id: amd64_release_asset
uses: actions/upload-release-asset@v1
......@@ -42,7 +87,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/${{ env.amd64__filename__ }}
asset_path: ${{steps.amd64-artifact-download.outputs.download-path}}/${{ env.amd64__filename__ }}
asset_name: ${{ env.amd64__filename__ }}
asset_content_type: application/vnd.debian.binary-package
- name: Upload arm32 Release Asset
......@@ -52,7 +97,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/${{ env.arm32__filename__ }}
asset_path: ${{steps.amd64-artifact-download.outputs.download-path}}/${{ env.arm32__filename__ }}
asset_name: ${{ env.arm32__filename__ }}
asset_content_type: application/vnd.debian.binary-package
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment