Fix release asset paths #110
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: x86_64 | |
| runner: ubuntu-latest | |
| - arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| steps: | |
| - name: start service container | |
| run: | | |
| docker run --rm -d --name minio -p 9000:9000 \ | |
| -e MINIO_ROOT_USER=minioadmin \ | |
| -e MINIO_ROOT_PASSWORD=minioadmin \ | |
| quay.io/minio/minio server /data | |
| sleep 3 | |
| curl -s -D- http://localhost:9000 | |
| - uses: actions/checkout@v2 | |
| - uses: haskell-actions/setup@v2 | |
| with: | |
| enable-stack: true | |
| stack-version: 'latest' | |
| - name: Cache | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: cache-stack | |
| with: | |
| path: ~/.stack | |
| key: ${{ runner.os }}-${{ matrix.arch }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/stack.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.arch }}-build-${{ env.cache-name }}- | |
| ${{ runner.os }}-${{ matrix.arch }}-build- | |
| ${{ runner.os }}-${{ matrix.arch }}- | |
| - name: Build dependencies | |
| run: | | |
| stack --no-terminal build --test --only-dependencies | |
| - name: Build | |
| run: | | |
| mkdir dist | |
| stack --no-terminal build --test --no-run-tests --copy-bins --local-bin-path dist | |
| - name: Test | |
| run: | | |
| export TASKRUNNER_TEST_S3_ENDPOINT=http://localhost:9000 | |
| export TASKRUNNER_TEST_S3_ACCESS_KEY=minioadmin | |
| export TASKRUNNER_TEST_S3_SECRET_KEY=minioadmin | |
| stack --no-terminal build --test | |
| - name: Package | |
| run: | | |
| cd dist | |
| # Create architecture-specific archive | |
| tar czvf taskrunner-linux-${{ matrix.arch }}.tar.gz taskrunner | |
| # For x86_64, also create legacy name for backward compatibility | |
| if [ "${{ matrix.arch }}" == "x86_64" ]; then | |
| cp taskrunner-linux-${{ matrix.arch }}.tar.gz taskrunner-linux.tar.gz | |
| fi | |
| - name: Archive production artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: taskrunner-linux-${{ matrix.arch }} | |
| path: | | |
| dist/*.tar.gz |