Skip to content

unsilence ci curl

unsilence ci curl #20

Workflow file for this run

name: Linux
on:
push:
branches: [main]
tags: ['[0-9]+.[0-9]+.[0-9]+']
pull_request:
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
artifact: 3code-linux-amd64
ext: tar.gz
- os: ubuntu-22.04-arm
artifact: 3code-linux-arm64
ext: tar.gz
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: stable
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: |
nimble install -y --depsOnly
nimble setup -y
echo '--path:"src"' >> nimble.paths
- name: Compute build flags
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
# autoupdate on releases only
echo "BUILD_FLAGS=-d:autoUpdate" >> "$GITHUB_ENV"
fi
- name: Build
run: nimble build -y -d:release ${{ env.BUILD_FLAGS }}
- name: Run tests
run: nimble test
timeout-minutes: 20
- name: Package
run: |
mkdir -p ${{ matrix.artifact }}
cp 3code ${{ matrix.artifact }}/
cp README.md LICENSE ${{ matrix.artifact }}/
tar czf ${{ matrix.artifact }}.${{ matrix.ext }} ${{ matrix.artifact }}
- name: Upload artifact to 3code.capocasa.dev
if: github.ref == 'refs/heads/main'
run: |
curl -f -H "Authorization: Bearer ${{ secrets.RELEASE_SECRET }}" -F "file=${{ matrix.artifact }}.${{ matrix.ext }}" \
https://3code.capocasa.dev/main/upload.nim