BLAHAJ/.github/workflows/release.yml

44 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2022-05-18 18:41:41 +02:00
name: Release
2022-05-18 18:41:41 +02:00
on: workflow_dispatch
2022-05-18 18:41:41 +02:00
jobs:
build_linux_static:
runs-on: ubuntu-latest
container:
image: crystallang/crystal:latest-alpine
steps:
- name: Download source
uses: actions/checkout@v4
2022-05-18 18:41:41 +02:00
- name: Retrieve version
run: |
echo "VERSION=$(shards version)" >> "$GITHUB_OUTPUT"
2022-05-18 18:41:41 +02:00
id: version
- name: Build
run: make static
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@v4
2022-05-18 18:41:41 +02:00
- 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