Build and Release Package #6
This file contains 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 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 | |
- name: Find Package Contents | |
run: | | |
cd YetAnotherHttpHandler/src | |
echo "YetAnotherHttpHandler.meta" > metalist | |
find YetAnotherHttpHandler/ -name \*.meta >> metalist | |
- name: Create Unity Package | |
uses: pCYSl5EDgo/create-unitypackage@v1.2.3 | |
with: | |
package-path: "${{ github.workspace }}/YetAnotherHttpHandler-${{ github.event.inputs.version }}.unitypackage" | |
include-files: metaList | |
working-folder: YetAnotherHttpHandler/src | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: YetAnotherHttpHandler-${{ github.event.inputs.version }}.unitypackage | |
make_latest: "true" | |
tag_name: ${{ github.event.inputs.version }} |