name: daily windows on: workflow_dispatch: inputs: release_note: description: 'build and release vendetta for windows' required: false default: ':3' type: string jobs: build-and-release: runs-on: artix-base env: MPV_DLL_VER: 20261021/mpv-dev-x86_64-20261021-git-e471496c56 steps: - name: Install deps run: | pacman -Sy --needed --noconfirm mingw-w64-binutils mingw-w64-crt mingw-w64-gcc mingw-w64-headers mingw-w64-winpthreads 7zip base-devel jq mingw-w64-toolchain git nodejs wget git clone --depth=1 https://github.com/vlang/v /tmp/v make -C /tmp/v /tmp/v/v version /tmp/v/v install ui2 - name: Checkout code uses: https://data.forgejo.org/actions/checkout@v7 with: fetch-depth: 0 - name: Build, Package and Release env: TOKEN: ${{ forgejo.token }} API: "https://git.vorelabs.dev/api/v1/repos/vorelabs/vendetta" NOTE: ${{ inputs.release_note }} run: | DATE=$(date +'%d%m%Y') DATEP=$(date +'%d.%m.%Y') TAG="$DATE" mkdir /tmp/dist /tmp/v/v -new-compiler -prod -os windows -d ui2_custom_rendering -o /tmp/dist/vendetta.exe src cp -R assets/ /tmp/dist/ wget https://github.com/shinchiro/mpv-winbuild-cmake/releases/download/$MPV_DLL_VER.7z 7z e *.7z libmpv-2.dll mv libmpv-2.dll /tmp/dist cd /tmp/dist sha256sum vendetta.exe libmpv-2.dll > SHA256SUMS FILE=/tmp/vendetta-windows-$TAG.zip 7z a $FILE /tmp/dist/* RELEASE_BODY=$(jq -n \ --arg tag "$TAG" \ --arg name "Vendetta $DATEP" \ --arg body "o_O" \ --arg target "$GITHUB_SHA" \ '{tag_name: $tag, name: $name, body: $body, target_commitish: $target}') RELEASE_JSON=$(curl -fsS -H "Authorization: token $TOKEN" \ "$API/releases/tags/$TAG" 2>/dev/null || true) if [ -z "$RELEASE_JSON" ]; then RELEASE_JSON=$(curl -fsS -X POST "$API/releases" \ -H "Authorization: token $TOKEN" \ -H "Content-Type: application/json" \ -d "$RELEASE_BODY") fi RELEASE_ID=$(printf '%s' "$RELEASE_JSON" | jq -er '.id') NAME=$(basename "$FILE") curl -fsS -X POST "$API/releases/$RELEASE_ID/assets?name=$NAME" \ -H "Authorization: token $TOKEN" \ -F "attachment=@$FILE"