fix(ci): re-register tag release workflow on main #1
This file contains hidden or 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 | ||
|
Check failure on line 1 in .github/workflows/tag-release.yml
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
| jobs: | ||
| release: | ||
| runs-on: macos-13 | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install XcodeGen | ||
| run: brew install xcodegen | ||
| - name: Generate project | ||
| run: xcodegen generate | ||
| - name: Test | ||
| run: /usr/bin/xcodebuild -project RhythmReplica.xcodeproj -scheme RhythmReplica -destination 'platform=macOS' test | ||
| - name: Build release app | ||
| run: ./scripts/build-release.sh | ||
| - name: Import signing certificate | ||
| if: ${{ secrets.CERTIFICATE_P12 != '' && secrets.CERTIFICATE_PASSWORD != '' && secrets.DEVELOPER_ID_APPLICATION != '' }} | ||
| run: | | ||
| echo "$CERTIFICATE_P12" | base64 --decode > build/certificate.p12 | ||
| security create-keychain -p runner build.keychain | ||
| security default-keychain -s build.keychain | ||
| security unlock-keychain -p runner build.keychain | ||
| security import build/certificate.p12 -k build.keychain -P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign | ||
| security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k runner build.keychain | ||
| env: | ||
| CERTIFICATE_P12: ${{ secrets.CERTIFICATE_P12 }} | ||
| CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }} | ||
| - name: Sign app bundle | ||
| if: ${{ secrets.CERTIFICATE_P12 != '' && secrets.CERTIFICATE_PASSWORD != '' && secrets.DEVELOPER_ID_APPLICATION != '' }} | ||
| run: | | ||
| codesign --force --deep --options runtime --sign "$DEVELOPER_ID_APPLICATION" "build/Products/Rhythm Replica.app" | ||
| env: | ||
| DEVELOPER_ID_APPLICATION: ${{ secrets.DEVELOPER_ID_APPLICATION }} | ||
| - name: Package DMG | ||
| run: ./scripts/package-dmg.sh | ||
| - name: Notarize app bundle | ||
| if: ${{ secrets.APPLE_ID != '' && secrets.APPLE_TEAM_ID != '' && secrets.APP_SPECIFIC_PASSWORD != '' && secrets.DEVELOPER_ID_APPLICATION != '' }} | ||
| run: | | ||
| xcrun notarytool submit "build/RhythmReplica.dmg" --apple-id "$APPLE_ID" --team-id "$APPLE_TEAM_ID" --password "$APP_SPECIFIC_PASSWORD" --wait | ||
| xcrun stapler staple "build/Products/Rhythm Replica.app" | ||
| xcrun stapler staple "build/RhythmReplica.dmg" | ||
| env: | ||
| APPLE_ID: ${{ secrets.APPLE_ID }} | ||
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | ||
| APP_SPECIFIC_PASSWORD: ${{ secrets.APP_SPECIFIC_PASSWORD }} | ||
| - name: SHA256 | ||
| run: ./scripts/sha256.sh build/RhythmReplica.dmg > build/RhythmReplica.dmg.sha256 | ||
| - name: Create release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: | | ||
| build/RhythmReplica.dmg | ||
| build/RhythmReplica.dmg.sha256 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||