Skip to content

Commit

Permalink
Automatic creation of builds on push tags
Browse files Browse the repository at this point in the history
  • Loading branch information
corentinfoure committed Aug 5, 2023
1 parent 17b36b3 commit 0456855
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Release"

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
draft-release:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Copy Binary
run: |
make build-reproducible-all
make build-testnet-reproducible-all
- name: Draft Release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
kid_mainnet_linux_amd64
kid_mainnet_linux_arm64
kid_testnet_linux_amd64
kid_testnet_linux_arm64
kid_sha256.txt
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ build-reproducible-generic: go.sum
--build-arg VERSION="$(VERSION)" \
-f Dockerfile .
$(DOCKER) create -ti --name $(subst /,-,latest-build-$(PLATFORM)) latest-build-$(PLATFORM) kid
mkdir -p $(CURDIR)/build/$(NETWORK)/$(PLATFORM)/
$(DOCKER) cp -a $(subst /,-,latest-build-$(PLATFORM)):/usr/local/bin/kid $(CURDIR)/build/$(NETWORK)/$(PLATFORM)/kid
$(DOCKER) cp -a $(subst /,-,latest-build-$(PLATFORM)):/usr/local/bin/kid "$(CURDIR)/kid_$(shell echo '$(NETWORK)' | tr '[:upper:]' '[:lower:]')_$(subst /,_,$(PLATFORM))"
sha256sum kid_$(shell echo '$(NETWORK)' | tr '[:upper:]' '[:lower:]')_$(subst /,_,$(PLATFORM)) >> ./kid_sha256.txt

build-linux: go.sum
LEDGER_ENABLED=false GOOS=linux GOARCH=amd64 $(MAKE) build
Expand Down

0 comments on commit 0456855

Please sign in to comment.