diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml index 2b27c04c..12da0e28 100644 --- a/.github/workflows/docker-publish.yaml +++ b/.github/workflows/docker-publish.yaml @@ -2,8 +2,6 @@ name: Create and Push Docker Image on: push: - tags: - - '**' branches: - '**' diff --git a/.github/workflows/draft-release.yaml b/.github/workflows/draft-release.yaml new file mode 100644 index 00000000..5696a55b --- /dev/null +++ b/.github/workflows/draft-release.yaml @@ -0,0 +1,59 @@ +name: Create and Push Docker Image + +on: + push: + tags: + - '**' + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: strangelove-ventures/heighliner-build-action@v0.0.3 + with: + chain: noble + dockerfile: cosmos + build-target: make install + binaries: | + - /go/bin/nobled + + draft-release: + needs: build-and-push-image + runs-on: ubuntu-latest + steps: + - name: Copy Binary + run: | + docker create -it --entrypoint sh --name amd --platform linux/amd64 ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.ref_name }} + docker create -it --entrypoint sh --name arm --platform linux/arm64 ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.ref_name }} + docker cp amd:/bin/nobled ./nobled_linux-amd64 + docker cp arm:/bin/nobled ./nobled_linux-arm64 + sha256sum ./nobled_linux-amd64 > ./nobled_sha256.txt + sha256sum ./nobled_linux-arm64 >> ./nobled_sha256.txt + + - name: Draft Release + uses: softprops/action-gh-release@v1 + with: + draft: true + files: | + nobled_linux-amd64 + nobled_linux-arm64 + nobled_sha256.txt