2022-05-18 18:41:41 +02:00
|
|
|
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@v2
|
|
|
|
- name: Retrieve version
|
|
|
|
run: |
|
|
|
|
echo "::set-output name=VERSION::$(shards version)"
|
|
|
|
id: version
|
|
|
|
- name: Build
|
2022-07-28 17:22:02 +02:00
|
|
|
run: make static_mt
|
2022-05-18 18:41:41 +02:00
|
|
|
- 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@v2
|
|
|
|
- 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
|