2020-03-15 01:32:02 +00:00
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
jobs:
|
2020-03-16 00:04:20 +00:00
|
|
|
test:
|
2023-04-30 22:00:23 +00:00
|
|
|
# runs-on: macOS-latest
|
|
|
|
runs-on: macos-13
|
2020-03-16 00:04:20 +00:00
|
|
|
timeout-minutes: 10
|
|
|
|
steps:
|
2023-12-12 22:30:06 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-03-16 00:04:20 +00:00
|
|
|
- name: Setup Signing
|
|
|
|
env:
|
|
|
|
SIGNING_DATA: ${{ secrets.SIGNING_DATA }}
|
|
|
|
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
|
|
|
|
HOST_PROFILE_DATA: ${{ secrets.HOST_PROFILE_DATA }}
|
|
|
|
AGENT_PROFILE_DATA: ${{ secrets.AGENT_PROFILE_DATA }}
|
2021-02-26 06:28:02 +00:00
|
|
|
APPLE_API_KEY_DATA: ${{ secrets.APPLE_API_KEY_DATA }}
|
|
|
|
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
|
2020-03-16 00:04:20 +00:00
|
|
|
run: ./.github/scripts/signing.sh
|
2020-04-05 23:05:45 +00:00
|
|
|
- name: Set Environment
|
2024-01-16 21:39:07 +00:00
|
|
|
run: sudo xcrun xcode-select -s /Applications/Xcode_15.2.app
|
2020-03-16 00:04:20 +00:00
|
|
|
- name: Test
|
2022-01-02 00:43:29 +00:00
|
|
|
run: |
|
|
|
|
pushd Sources/Packages
|
|
|
|
swift test
|
|
|
|
popd
|
2020-03-15 01:32:02 +00:00
|
|
|
build:
|
2023-04-30 22:28:54 +00:00
|
|
|
# runs-on: macOS-latest
|
|
|
|
runs-on: macos-13
|
2020-03-15 01:32:02 +00:00
|
|
|
timeout-minutes: 10
|
|
|
|
steps:
|
2023-12-12 22:30:06 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-03-15 08:08:41 +00:00
|
|
|
- name: Setup Signing
|
2020-03-15 01:32:02 +00:00
|
|
|
env:
|
|
|
|
SIGNING_DATA: ${{ secrets.SIGNING_DATA }}
|
|
|
|
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
|
|
|
|
HOST_PROFILE_DATA: ${{ secrets.HOST_PROFILE_DATA }}
|
|
|
|
AGENT_PROFILE_DATA: ${{ secrets.AGENT_PROFILE_DATA }}
|
2021-02-26 06:28:02 +00:00
|
|
|
APPLE_API_KEY_DATA: ${{ secrets.APPLE_API_KEY_DATA }}
|
|
|
|
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
|
2020-03-15 01:45:28 +00:00
|
|
|
run: ./.github/scripts/signing.sh
|
2020-09-22 06:12:50 +00:00
|
|
|
- name: Set Environment
|
2024-01-16 21:39:07 +00:00
|
|
|
run: sudo xcrun xcode-select -s /Applications/Xcode_15.2.app
|
2020-03-15 08:01:40 +00:00
|
|
|
- name: Update Build Number
|
|
|
|
env:
|
|
|
|
TAG_NAME: ${{ github.ref }}
|
2020-03-20 04:16:14 +00:00
|
|
|
RUN_ID: ${{ github.run_id }}
|
2020-03-15 08:01:40 +00:00
|
|
|
run: |
|
2020-03-15 08:08:41 +00:00
|
|
|
export CLEAN_TAG=$(echo $TAG_NAME | sed -e 's/refs\/tags\/v//')
|
2022-01-02 00:43:29 +00:00
|
|
|
sed -i '' -e "s/GITHUB_CI_VERSION/$CLEAN_TAG/g" Sources/Config/Config.xcconfig
|
|
|
|
sed -i '' -e "s/GITHUB_BUILD_NUMBER/1.$RUN_ID/g" Sources/Config/Config.xcconfig
|
|
|
|
sed -i '' -e "s/GITHUB_BUILD_URL/https:\/\/github.com\/maxgoedjen\/secretive\/actions\/runs\/$RUN_ID/g" Sources/Secretive/Credits.rtf
|
2020-03-15 01:32:02 +00:00
|
|
|
- name: Build
|
2022-01-02 00:43:29 +00:00
|
|
|
run: xcrun xcodebuild -project Sources/Secretive.xcodeproj -scheme Secretive -configuration Release -archivePath Archive.xcarchive archive
|
2020-03-15 01:32:02 +00:00
|
|
|
- name: Create ZIPs
|
|
|
|
run: |
|
|
|
|
ditto -c -k --sequesterRsrc --keepParent Archive.xcarchive/Products/Applications/Secretive.app ./Secretive.zip
|
|
|
|
ditto -c -k --sequesterRsrc --keepParent Archive.xcarchive ./Archive.zip
|
|
|
|
- name: Notarize
|
|
|
|
env:
|
2021-02-26 06:28:02 +00:00
|
|
|
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
|
|
|
|
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
|
2021-11-08 04:19:41 +00:00
|
|
|
run: xcrun notarytool submit --key ~/.private_keys/AuthKey_$APPLE_API_KEY_ID.p8 --key-id $APPLE_API_KEY_ID --issuer $APPLE_API_ISSUER Secretive.zip
|
2020-03-15 01:32:02 +00:00
|
|
|
- name: Document SHAs
|
|
|
|
run: |
|
2022-04-23 02:37:28 +00:00
|
|
|
echo "sha-512:"
|
2020-03-15 01:32:02 +00:00
|
|
|
shasum -a 512 Secretive.zip
|
|
|
|
shasum -a 512 Archive.zip
|
2022-04-23 02:37:28 +00:00
|
|
|
echo "sha-256:"
|
|
|
|
shasum -a 256 Secretive.zip
|
|
|
|
shasum -a 256 Archive.zip
|
2021-01-18 23:14:23 +00:00
|
|
|
- name: Create Release
|
|
|
|
id: create_release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tag_name: ${{ github.ref }}
|
|
|
|
release_name: ${{ github.ref }}
|
|
|
|
body: |
|
|
|
|
Update description
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
|
|
|
|
## Fixes
|
|
|
|
|
|
|
|
|
|
|
|
## Minimum macOS Version
|
|
|
|
|
|
|
|
|
|
|
|
## Build
|
|
|
|
https://github.com/maxgoedjen/secretive/actions/runs/${{ github.run_id }}
|
|
|
|
draft: true
|
|
|
|
prerelease: false
|
2020-03-15 01:48:12 +00:00
|
|
|
- name: Upload App to Release
|
2021-12-24 21:55:26 +00:00
|
|
|
id: upload-release-asset-app
|
2020-03-15 01:32:02 +00:00
|
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
asset_path: ./Secretive.zip
|
|
|
|
asset_name: Secretive.zip
|
|
|
|
asset_content_type: application/zip
|
2021-12-24 21:55:26 +00:00
|
|
|
- name: Upload App to Artifacts
|
2020-03-15 01:48:12 +00:00
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: Secretive.zip
|
|
|
|
path: Secretive.zip
|
2021-12-24 21:55:26 +00:00
|
|
|
- name: Upload Archive to Artifacts
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: Xcode_Archive.zip
|
|
|
|
path: Archive.zip
|