Skip to content

Commit

Permalink
try to release both ARM and AMD
Browse files Browse the repository at this point in the history
  • Loading branch information
Selfeer committed Oct 25, 2024
1 parent bbaca16 commit 8208733
Showing 1 changed file with 49 additions and 11 deletions.
60 changes: 49 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,25 @@ on:
required: true

jobs:
build-deb:
create-release:
runs-on: [self-hosted, on-demand, type-cpx41, image-x86-app-docker-ce]
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: Release ${{ github.event.inputs.version }}
draft: false
prerelease: false

build-deb-amd64:
runs-on: [self-hosted, on-demand, type-cpx41, image-x86-app-docker-ce]
needs: create-release
timeout-minutes: 180
steps:
- name: Checkout code
Expand All @@ -18,32 +35,53 @@ jobs:
- name: Make build.sh executable
run: chmod +x ./build

- name: Run build
- name: Run build for AMD64
run: ./build

- name: Locate the .deb file
id: locate_deb
run: |
DEB_FILE=$(find ./parquetify -name "parquetify_*_amd64.deb")
echo "DEB_FILE=$DEB_FILE"
echo "::set-output name=deb_file::$DEB_FILE"
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
- name: Upload .deb to GitHub Releases
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: Release ${{ github.event.inputs.version }}
draft: false
prerelease: false
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ${{ steps.locate_deb.outputs.deb_file }}
asset_name: parquetify_${{ github.event.inputs.version }}_amd64.deb
asset_content_type: application/x-debian-package

build-deb-arm64:
runs-on: [self-hosted, on-demand, type-cax41, image-arm-app-docker-ce]
needs: create-release
timeout-minutes: 180
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Make build.sh executable
run: chmod +x ./build

- name: Run build for ARM64
run: ./build arm

- name: Locate the .deb file
id: locate_deb
run: |
DEB_FILE=$(find ./parquetify -name "parquetify_*_arm64.deb")
echo "DEB_FILE=$DEB_FILE"
echo "::set-output name=deb_file::$DEB_FILE"
- name: Upload .deb to GitHub Releases
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ${{ steps.locate_deb.outputs.deb_file }}
asset_name: parquetify_${{ github.event.inputs.version }}_amd64.deb
asset_name: parquetify_${{ github.event.inputs.version }}_arm64.deb
asset_content_type: application/x-debian-package

0 comments on commit 8208733

Please sign in to comment.