Skip to content

Bump version to 0.4.8 #66

Bump version to 0.4.8

Bump version to 0.4.8 #66

Workflow file for this run

on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: windows-2022
steps:
- name: Cache shards
uses: actions/cache@v2
with:
path: ~/.cache/shards
key: ${{ runner.os }}-shards-${{ hashFiles('shard.yml') }}
restore-keys: ${{ runner.os }}-shards-
- name: Enable Windows developer prompt
uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: "3.16.x"
- name: Download source
uses: actions/checkout@v2
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
- name: Install shards
run: shards check || shards install --without-development
- name: package information
run: |
echo "BINARY_NAME=bin/$(cat shard.yml |Select-String -Pattern 'targets:' -Context 1 |%{$_ -replace '> targets:',''}|%{$_ -replace '[\s:]*',''})" >> $Env:GITHUB_ENV
echo "PKG_ARCH=x86_64" >> $Env:GITHUB_ENV
echo "PLATFORM=pc-windows-msvc.zip" >> $Env:GITHUB_ENV
echo "BUILD_ARGS=" >> $Env:GITHUB_ENV
- name: set asset name
run: |
echo "ASSERT_NAME=${{env.BINARY_NAME}}-${{github.ref_name}}-${{env.PKG_ARCH}}-${{env.PLATFORM}}" >> $Env:GITHUB_ENV
- name: release binary
id: release
run: |
echo "ASSERT_NAME=${{env.ASSERT_NAME}}" >> $Env:GITHUB_OUTPUT
shards build --production --release --progress --no-debug -Dstrict_multi_assign -Dno_number_autocast ${{env.BUILD_ARGS}}
7z a ${{env.ASSERT_NAME}} ${{env.BINARY_NAME}}.exe LICENSE
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{steps.release.outputs.ASSERT_NAME}}