name: Release on: workflow_dispatch: inputs: version: description: Version from MARKETING_VERSION, without the v prefix required: true type: string permissions: contents: write concurrency: group: meetingnotes-release cancel-in-progress: false jobs: release: runs-on: macos-15 env: VERSION: ${{ inputs.version }} APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} APPLE_APP_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }} SPARKLE_PRIVATE_KEY: ${{ secrets.SPARKLE_PRIVATE_KEY }} steps: - uses: actions/checkout@v7 with: fetch-depth: 0 - name: Validate release secrets env: APPLE_CERTIFICATE_P12: ${{ secrets.APPLE_CERTIFICATE_P12 }} APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} run: | for variable in APPLE_CERTIFICATE_P12 APPLE_CERTIFICATE_PASSWORD APPLE_ID APPLE_TEAM_ID APPLE_APP_PASSWORD SPARKLE_PRIVATE_KEY; do if [[ -z "${!variable:-}" ]]; then echo "Missing GitHub Actions secret: $variable" >&2 exit 1 fi done - name: Import Developer ID certificate uses: apple-actions/import-codesign-certs@v7 with: p12-file-base64: ${{ secrets.APPLE_CERTIFICATE_P12 }} p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} - name: Locate Developer ID identity run: | signing_identity=$(security find-identity -v -p codesigning | awk -F '"' '/Developer ID Application/{print $2; exit}') if [[ -z "$signing_identity" ]]; then echo "The .p12 does not contain a Developer ID Application identity" >&2 exit 1 fi echo "SIGNING_IDENTITY=$signing_identity" >> "$GITHUB_ENV" - name: Build, sign, notarize, and create appcast timeout-minutes: 110 run: scripts/package_release.sh - name: Create GitHub release env: GH_TOKEN: ${{ github.token }} run: | tag="v$VERSION" if git rev-parse "$tag" >/dev/null 2>&1; then echo "Tag already exists: $tag" >&2 exit 1 fi gh release create "$tag" \ "$RUNNER_TEMP/meetingnotes-release/release/Meetingnotes-$VERSION.zip" \ "$RUNNER_TEMP/meetingnotes-release/release/appcast.xml" \ --target "$GITHUB_SHA" \ --title "Meetingnotes $VERSION" \ --generate-notes