-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Github CI to build & upload binaries & templates to the release
Signed-off-by: Aravinda Vishwanathapura <[email protected]>
- Loading branch information
1 parent
77c777e
commit 69f453f
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: "On Release" | ||
|
||
on: | ||
push: | ||
# Publish `1.2.3` tags as releases. | ||
tags: | ||
- "*" | ||
|
||
# Allow to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release_amd64: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Binnacle | ||
run: | | ||
curl -fsSL https://github.com/kadalu/binnacle/releases/latest/download/install.sh | sudo bash -x | ||
binnacle --version | ||
- name: Release builds | ||
run: sudo VERSION="${{ github.ref_name }}" binnacle -vv ci/release_build.t | ||
- name: Upload binary files to the release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: bin/kadalu-volgen-* | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
file_glob: true | ||
- name: Upload Template files to the release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: templates/* | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
file_glob: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- mode: ruby -*- | ||
|
||
PKG_VERSION = ENV["VERSION"] | ||
ENTRYPOINT = "/bin/sh" | ||
CMD_ARGS = "-c '/sbin/apk add --update --no-cache --force-overwrite libxml2-static xz-static && /usr/bin/shards build --production --release --static --stats --time'" | ||
|
||
# Build Amd64 | ||
TEST %{docker run --platform=linux/amd64 -i -v `pwd`:/workspace -w /workspace --env VERSION=#{PKG_VERSION} --rm --entrypoint #{ENTRYPOINT} 84codes/crystal:1.7.2-alpine-latest #{CMD_ARGS}} | ||
|
||
# Rename release binary | ||
TEST "mv bin/kadalu-volgen bin/kadalu-volgen-amd64" | ||
|
||
# Build Arm64 | ||
TEST "docker run --rm --privileged multiarch/qemu-user-static --reset -p yes" | ||
TEST %{docker run --platform=linux/arm64 -v `pwd`:/workspace -w /workspace --env VERSION=#{PKG_VERSION} -i --rm --entrypoint #{ENTRYPOINT} 84codes/crystal:1.7.2-alpine-latest #{CMD_ARGS}} | ||
|
||
# Rename release binary | ||
TEST "mv bin/kadalu-volgen bin/kadalu-volgen-arm64" |