Skip to content

chore: attempt 2/1231823 trying to build binary as release artifacts #2

chore: attempt 2/1231823 trying to build binary as release artifacts

chore: attempt 2/1231823 trying to build binary as release artifacts #2

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest, macos-latest ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up permissions to execute build script for Linux/macOS
if: ${{ matrix.os != 'windows-latest' }}
run: chmod +x build-mupdf.sh
- name: Build mutool
shell: bash
run: ./build-mupdf.sh
- name: Save binary
run: |
mkdir -p dist
cp bin/mutool dist/mutool-${{ matrix.os }}${{ matrix.os == 'windows-latest' && '.exe' || '' }}
- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: mutool-${{ matrix.os }}
path: dist/mutool-${{ matrix.os }}*
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download mutool binary (Linux)
uses: actions/download-artifact@v4
with:
name: mutool-ubuntu-latest
path: dist/
- name: Download mutool binary (macOS)
uses: actions/download-artifact@v4
with:
name: mutool-macos-latest
path: dist/
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false
- name: Upload Linux binary to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/mutool-ubuntu-latest
asset_name: mutool-linux
asset_content_type: application/octet-stream
- name: Upload macOS binary to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/mutool-macos-latest
asset_name: mutool-macos
asset_content_type: application/octet-stream