keychain-test #5
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
# This is a basic workflow to help you get started with Actions | |
name: keychain-test | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" branchb | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
runs-on: macos-12 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set Xcode 14.0.1 as default | |
shell: bash | |
run: sudo xcode-select -s /Applications/Xcode_14.0.1.app/Contents/Developer | |
- name: list keychain before adding | |
run: security list-keychains | |
- name: Set up keychain | |
run: | | |
security create-keychain -p test build.keychain | |
security default-keychain -s build.keychain | |
security unlock-keychain -p test build.keychain | |
- name: Run your application | |
run: | | |
echo "Default keychain is set to: $(security default-keychain)" | |
- name: list keychain after adding | |
run: security list-keychains | |
- name: Build and run application | |
run: | | |
clang -framework Foundation -framework Security main.m -o keychain_example | |
./keychain_example |