build: Publish windmill-amd64 binary for each release (#2417)

* Publish binary on release

* Add step for ee binary
This commit is contained in:
Guillaume Bouvignies
2023-10-10 06:38:36 -07:00
committed by GitHub
parent ade3d90d70
commit 080e0c40f9

View File

@@ -14,7 +14,7 @@ concurrency:
cancel-in-progress: true
permissions:
contents: read
contents: write
id-token: write
packages: write
@@ -165,6 +165,56 @@ jobs:
bucket: windmill-frontend
bucket-region: us-east-1
attach_binary_to_release:
needs: [build]
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- uses: actions/checkout@v3
- uses: shrink/actions-docker-extract@v2
id: extract
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
path: "/usr/src/app/windmill"
- name: Rename binary with corresponding architecture
run: |
# The GH worker downloaded the image corresponding to its own architecture
arch="$(dpkg --print-architecture)"; arch="${arch##*-}";
cd ${{ steps.extract.outputs.destination }}/
mv windmill "windmill-${arch}"
- name: Attach binary to release
uses: softprops/action-gh-release@v1
with:
files: |
${{ steps.extract.outputs.destination }}/*
attach_ee_binary_to_release:
needs: [build-ee]
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- uses: actions/checkout@v3
- uses: shrink/actions-docker-extract@v2
id: extract
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:latest
path: "/usr/src/app/windmill"
- name: Rename binary with corresponding architecture
run: |
# The GH worker downloaded the image corresponding to its own architecture
arch="$(dpkg --print-architecture)"; arch="${arch##*-}";
cd ${{ steps.extract.outputs.destination }}/
mv windmill "windmill-ee-${arch}"
- name: Attach binary to release
uses: softprops/action-gh-release@v1
with:
files: |
${{ steps.extract.outputs.destination }}/*
publish_ecr:
needs: [build_ee]
runs-on: ubuntu-latest