fix: release.yml #12
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: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: macos-latest | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer | |
steps: | |
- uses: actions/checkout@v2 | |
# See more details at https://docs.github.com/ja/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development | |
- name: Import Certificate | |
env: | |
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }} | |
CERTIFICATE_P12: ${{ secrets.CERTIFICATE_P12 }} | |
run: | | |
echo $CERTIFICATE_P12 | base64 --decode > certificate.p12 | |
security create-keychain -p runner build.keychain | |
security default-keychain -s build.keychain | |
security unlock-keychain -p runner build.keychain | |
security import certificate.p12 -k build.keychain -P $CERTIFICATE_PASSWORD -T /usr/bin/codesign | |
- name: Allow keychain access | |
run: | | |
security set-key-partition-list -S apple-tool:,apple: -s -k runner build.keychain | |
- name: Build app | |
run: xcodebuild -scheme TrackpadAir -project TrackpadAir.xcodeproj build | |
- name: Archive app | |
run: xcodebuild -scheme TrackpadAir -project TrackpadAir.xcodeproj archive -archivePath TrackpadAir.xcarchive | |
- name: Zip .app file from Archive | |
run: | | |
cd TrackpadAir.xcarchive/Products/Applications | |
zip -r TrackpadAir.app.zip TrackpadAir.app | |
mv TrackpadAir.app.zip ../../../ | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: v${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./TrackpadAir.app.zip | |
asset_name: TrackpadAir.app.zip | |
asset_content_type: application/zip |