v20.0.19 #78
Workflow file for this run
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: Release | |
on: | |
release: | |
types: [created] | |
# on: | |
# push: | |
# branches: | |
# - master | |
# - dev | |
jobs: | |
release: | |
name: Release CLI | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
target: [ | |
#x86_64-pc-windows-gnu, | |
#x86_64-unknown-linux-musl, | |
x86_64-apple-darwin, | |
] | |
package: [libs/cli] | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- uses: arduino/setup-protoc@v1 | |
with: | |
version: "3.x" | |
- uses: jetli/wasm-pack-action@v0.4.0 | |
with: | |
version: "latest" | |
# necessary to build the designer, there's a circular dependency, however | |
# (designer is used in the CLI) | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Set up Nodeme | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20.x" | |
- run: yarn install | |
- name: Build Packages | |
run: yarn build | |
- run: cargo build --release --locked | |
- name: Sign bin | |
uses: lando/code-sign-action@v2 | |
if: matrix.target == 'x86_64-apple-darwin' | |
with: | |
file: ./target/release/paperclip_cli | |
certificate-data: ${{ secrets.MACOS_CERTIFICATE }} | |
certificate-password: ${{ secrets.MACOS_CERTIFICATE_PWD }} | |
apple-team-id: "C94Z352LDR" | |
# env: | |
# BUILD_CERTIFICATE_BASE64: ${{ secrets.MACOS_CERTIFICATE }} | |
# P12_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }} | |
# KEYCHAIN_PASSWORD: "KEYCHAIN_PASSWORD" | |
# run: | | |
# CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 | |
# PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision | |
# KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db | |
# echo $P12_PASSWORD; | |
# echo $BUILD_CERTIFICATE_BASE64; | |
# # import certificate and provisioning profile from secrets | |
# echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH | |
# # create temporary keychain | |
# security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
# security set-keychain-settings -lut 21600 $KEYCHAIN_PATH | |
# security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
# # import certificate to keychain | |
# security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH | |
# security list-keychain -d user -s $KEYCHAIN_PATH | |
# # apply provisioning profile | |
# # mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | |
# # cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles | |
# security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$P12_PASSWORD" $KEYCHAIN_PATH | |
# ID=$(security find-identity -v) | |
# echo $ID | |
# /usr/bin/codesign --force -s "Developer ID Application: Craig Condon (C94Z352LDR)" ./target/release/paperclip_cli -v | |
# https://github.com/actions/upload-release-asset | |
# https://github.com/marketplace/actions/upload-files-to-a-github-release | |
- name: Compress file | |
run: cd target/release && tar -czvf ${{ matrix.target }}-paperclip_cli.tar.gz paperclip_cli | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: target/release/${{ matrix.target }}-paperclip_cli.tar.gz | |
asset_name: ${{ matrix.asset_name }} | |
tag: ${{ github.ref }} |