name: Release on: push: tags: ["v[0-9]+.[0-9]+.[0-9]+*"] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_TERM_COLOR: always jobs: windows: runs-on: windows-latest defaults: run: shell: bash steps: - uses: actions/checkout@v2 - name: Build run: cargo build --release - name: Install WiX run: nuget install WiX - name: Crate msi installer run: | ./WiX.*/tools/candle.exe -arch "x64" -ext WixUIExtension -ext WixUtilExtension \ -out "./lapce.wixobj" "extra/windows/wix/lapce.wxs" ./WiX.*/tools/light.exe -ext WixUIExtension -ext WixUtilExtension \ -out "./Lapce-windows.msi" -sice:ICE61 -sice:ICE91 \ "./lapce.wixobj" - name: Upload msi installer uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: ./Lapce-windows.msi file_glob: true tag: ${{ github.ref }} overwrite: true macos: runs-on: macos-11 steps: - uses: actions/checkout@v2 - name: Install ARM target run: rustup update && rustup target add aarch64-apple-darwin - name: Import Certificate uses: apple-actions/import-codesign-certs@v1 with: p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }} p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }} - name: Make DMG run: make dmg-universal - name: Rename run: | cp ./target/release/macos/Lapce.dmg ./target/release/macos/Lapce-macos.dmg - name: "Notarize Release Build" uses: devbotsxyz/xcode-notarize@v1 with: product-path: "./target/release/macos/Lapce-macos.dmg" appstore-connect-username: ${{ secrets.NOTARIZE_USERNAME }} appstore-connect-password: ${{ secrets.NOTARIZE_PASSWORD }} primary-bundle-id: "io.lapce" - name: "Staple Release Build" uses: devbotsxyz/xcode-staple@v1 with: product-path: "./target/release/macos/Lapce-macos.dmg" - name: Upload Application uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: ./target/release/macos/Lapce-macos.dmg file_glob: true tag: ${{ github.ref }} overwrite: true