lapce/.github/workflows/release.yml

76 lines
2.3 KiB
YAML
Raw Normal View History

2021-10-06 11:42:43 +00:00
name: Release
on:
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+*"]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_TERM_COLOR: always
jobs:
2021-10-06 15:49:54 +00:00
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: |
2021-10-06 16:19:26 +00:00
./WiX.*/tools/candle.exe -arch "x64" -ext WixUIExtension -ext WixUtilExtension \
2021-10-06 15:49:54 +00:00
-out "./lapce.wixobj" "extra/windows/wix/lapce.wxs"
2021-10-06 16:19:26 +00:00
./WiX.*/tools/light.exe -ext WixUIExtension -ext WixUtilExtension \
2021-10-06 19:20:07 +00:00
-out "./Lapce-windows.msi" -sice:ICE61 -sice:ICE91 \
2021-10-06 15:49:54 +00:00
"./lapce.wixobj"
- name: Upload msi installer
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
2021-10-06 19:20:07 +00:00
file: ./Lapce-windows.msi
2021-10-06 15:49:54 +00:00
file_glob: true
tag: ${{ github.ref }}
overwrite: true
2021-10-06 11:42:43 +00:00
macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Install ARM target
run: rustup update && rustup target add aarch64-apple-darwin
2021-10-08 19:38:33 +00:00
- name: Import Certificate
2021-10-08 19:46:17 +00:00
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }}
p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }}
2021-10-08 19:38:33 +00:00
- name: Make DMG
run: make dmg-universal
- name: Rename
run: |
cp ./target/release/macos/Lapce.dmg ./target/release/macos/Lapce-macos.dmg
2021-10-09 20:32:46 +00:00
- name: "Notarize Release Build"
uses: devbotsxyz/xcode-notarize@v1
with:
product-path: "./target/release/macos/Lapce-macos.dmg"
2021-10-09 21:01:11 +00:00
appstore-connect-username: ${{ secrets.NOTARIZE_USERNAME }}
appstore-connect-password: ${{ secrets.NOTARIZE_PASSWORD }}
2021-10-09 20:32:46 +00:00
- name: "Staple Release Build"
uses: devbotsxyz/xcode-staple@v1
with:
product-path: "./target/release/macos/Lapce-macos.dmg"
2021-10-06 11:42:43 +00:00
- name: Upload Application
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
2021-10-06 16:19:26 +00:00
file: ./target/release/macos/Lapce-macos.dmg
2021-10-06 11:42:43 +00:00
file_glob: true
2021-10-06 11:47:39 +00:00
tag: ${{ github.ref }}
2021-10-06 11:42:43 +00:00
overwrite: true