Skip to content

Commit

Permalink
Add Action to include binary's and sha in release (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
boojamya authored Jul 5, 2023
1 parent 2c4db80 commit 92622ad
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Create and Push Docker Image

on:
push:
tags:
- '**'
branches:
- '**'

Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/draft-release.yaml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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

0 comments on commit 92622ad

Please sign in to comment.