Skip to content

v0.9.1

v0.9.1 #65

name: pull_request
on: push
env:
APP_NAME: 'Torrentinim'
NIM_VERSION: '1.6.12'
MAINTAINER: 'Sergio Tapia'
jobs:
build-artifact:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macOS-latest
steps:
- uses: actions/checkout@v1
- uses: jiro4989/setup-nim-action@v1
with:
nim-version: ${{ env.NIM_VERSION }}
- run: nimble build -Y -d:release --verbose
- name: Create artifact
run: |
os="${{ runner.os }}"
assets="${{ env.APP_NAME }}_$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]')"
echo "$assets"
mkdir -p "dist/$assets"
cp torrentinim torrentinim-data.db README.md LICENSE "dist/$assets/"
(
cd dist
if [[ "${{ runner.os }}" == Windows ]]; then
7z a "$assets.zip" "$assets"
else
tar czf "$assets.tar.gz" "$assets"
fi
ls -lah *.*
)
shell: bash