diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..13e904a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,42 @@ +name: Release + +on: + push: # TODO: releaese trigger + +jobs: + release: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + xcodebuild \ + -project ./NyaIME.xcodeproj \ + -configuration Release + mkdir ./tmp/app + mv ./build/Release/NyaIME.app ./tmp/app/ + + - name: Build Package + run: | + xcrun pkgbuild \ + --version 0 \ + --root ./tmp/app \ + --component-plist ./pkg.plist \ + --identifier me.koki.inputmethod.NyaIME \ + --install-location '/Library/Input Methods' \ + ./tmp/tmp.pkg + + - name: Build Installer + run: | + xcrun productbuild \ + --distribution distribution.xml \ + --package-path ./tmp \ + ./tmp/NyaIME.pkg + + # TODO: upload package to release + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: NyaIME + path: ./tmp/NyaIME.pkg