BLAHAJ/.github/workflows/release.yml
Will Fantom c3b1707bdb
feat: Docker Support 🐳 (#11)
* feat: added dockerfile and relvant docs

* feat: added ci to publish docker images

* chore: bumped all checkout actions to v4

* chore: removed unnecessary deps from build stage

* chore: changed build targets to amd64 and arm64 only

* chore: moved docker publish logic to push trigger

Switched the docker image build/publish pipeline event to a push event
on either a `v*` tag or to the main branch.

* fix: README

* feat: publish => docker

* feat: dont run on main push

lets only publish releases instead

---------

Co-authored-by: Evangelos Paterakis <evan@geopjr.dev>
2023-10-15 20:35:03 +03:00

43 lines
1.2 KiB
YAML

name: Release
on: workflow_dispatch
jobs:
build_linux_static:
runs-on: ubuntu-latest
container:
image: crystallang/crystal:latest-alpine
steps:
- name: Download source
uses: actions/checkout@v4
- name: Retrieve version
run: |
echo "VERSION=$(shards version)" >> "$GITHUB_OUTPUT"
id: version
- name: Build
run: make static_mt
- name: Make binary executable
run: chmod +x bin/blahaj
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: blahaj-${{ steps.version.outputs.VERSION }}-linux-x86_64-static
path: bin/blahaj
release:
runs-on: ubuntu-latest
needs: build_linux_static
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v2
with:
path: ./GH_ARTIFACTS
- name: Make all binaries executable
run: chmod +x GH_ARTIFACTS/**/*
- name: Create zips
run: cd GH_ARTIFACTS && find . -maxdepth 1 -mindepth 1 -type d -execdir zip -jr '{}.zip' '{}' \; && cd ..
- uses: softprops/action-gh-release@v1
with:
draft: true
files: |
GH_ARTIFACTS/*.zip