Skip to content

Build and Release Package #10

Build and Release Package

Build and Release Package #10

Workflow file for this run

name: Build and Release Package
on:
workflow_dispatch:
inputs:
version:
description: "Version to build"
required: true
jobs:
build:
runs-on: macos-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: Cysharp/YetAnotherHttpHandler
ref: ${{ github.event.inputs.version }}
path: YetAnotherHttpHandler
- name: Modify Package
run: |
cp -f dist/YetAnotherHttpHandler.meta YetAnotherHttpHandler/src/YetAnotherHttpHandler.meta
cp -rf dist/osx-universal YetAnotherHttpHandler/src/YetAnotherHttpHandler/Plugins/Cysharp.Net.Http.YetAnotherHttpHandler.Native/runtimes/
cd YetAnotherHttpHandler/src/YetAnotherHttpHandler/Plugins/Cysharp.Net.Http.YetAnotherHttpHandler.Native/runtimes/
lipo -create osx-arm64/native/libCysharp.Net.Http.YetAnotherHttpHandler.Native.dylib osx-x64/native/libCysharp.Net.Http.YetAnotherHttpHandler.Native.dylib -output osx-universal/libCysharp.Net.Http.YetAnotherHttpHandler.Native.dylib
rm -rf osx-arm64
rm -rf osx-x64
rm -f osx-arm64.meta osx-x64.meta
- name: Zip Package
run: |
cd YetAnotherHttpHandler/src
ditto -c -k --sequesterRsrc --keepParent YetAnotherHttpHandler ../../YetAnotherHttpHandler-${{ github.event.inputs.version }}.zip
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: YetAnotherHttpHandler-${{ github.event.inputs.version }}.zip
make_latest: "true"
tag_name: ${{ github.event.inputs.version }}