Skip to content

Fix dpi

Fix dpi #10

Workflow file for this run

name: Nightly
on:
push:
permissions:
contents: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
prepare:
name: Compute tag
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
steps:
- name: Derive tag from commit SHA
id: tag
run: echo "tag=nightly-${GITHUB_SHA::7}-${GITHUB_RUN_NUMBER}" >> "$GITHUB_OUTPUT"
build:
name: Build (${{ matrix.rid }})
needs: prepare
strategy:
fail-fast: false
matrix:
include:
- runner: windows-latest
rid: win-x64
- runner: ubuntu-latest
rid: linux-x64
- runner: macos-latest
rid: osx-arm64
- runner: macos-latest
rid: osx-x64
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- name: Set up .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
- name: Install build tools (linux-x64)
if: matrix.rid == 'linux-x64'
run: |
sudo apt-get update -q
sudo apt-get install -y clang zlib1g-dev
- name: Publish
run: >
dotnet publish Shark.csproj
-c Release
-r ${{ matrix.rid }}
--self-contained
-o out
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: Shark-${{ matrix.rid }}
path: out/
retention-days: 1
release:
name: Publish release
needs: [prepare, build]
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
steps:
- name: Download all build artifacts
uses: actions/download-artifact@v4
with:
path: dist
- name: Zip each platform directory
run: |
mkdir zips
for dir in dist/*/; do
name=$(basename "$dir")
(cd "$dir" && zip -r "../../zips/${name}.zip" .)
done
- name: Create draft release with assets
run: |
gh release create "${{ needs.prepare.outputs.tag }}" zips/*.zip \
--repo "$GH_REPO" \
--title "Nightly - ${{ needs.prepare.outputs.tag }}" \
--notes "Automated nightly build.
Commit: ${{ github.sha }}
Branch: ${{ github.ref_name }}" \
--prerelease \
--draft \
--target "${{ github.sha }}"
- name: Publish the draft release
run: |
gh release edit "${{ needs.prepare.outputs.tag }}" --draft=false --prerelease --repo "$GH_REPO"