70 lines
2.6 KiB
YAML
70 lines
2.6 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
APPCENTER_SECRET: ${{ secrets.APPCENTER_SECRET }}
|
|
APPCENTER_TOKEN: ${{ secrets.APPCENTER_TOKEN }}
|
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
APPLE_P12_CERTIFICATE: ${{ secrets.APPLE_P12_CERTIFICATE }}
|
|
SPARKLE_ED_PRIVATE_KEY: ${{ secrets.SPARKLE_ED_PRIVATE_KEY }}
|
|
GITHUB_EVENT_BEFORE: ${{ github.event.before }}
|
|
GITHUB_EVENT_AFTER: ${{ github.event.after }}
|
|
BUILD_DIR: ${{ github.workspace }}
|
|
XCODE_BUILD_PATH: DerivedData/Build/Products/Release
|
|
VERSION_FILE: VERSION.txt
|
|
APP_NAME: AltTab
|
|
jobs:
|
|
build:
|
|
runs-on: macos-15 # all options: https://github.com/actions/runner-images/tree/main
|
|
environment: production
|
|
steps:
|
|
# - env:
|
|
# GITHUB_CONTEXT: ${{ toJSON(github) }}
|
|
# run: echo "$GITHUB_CONTEXT"
|
|
- id: pre-checkout
|
|
env:
|
|
COMMITS: ${{ toJson(github.event.commits) }}
|
|
run: |
|
|
if [[ "${{ github.event_name }}" == "push" ]]; then
|
|
COUNT=$(( $(echo "$COMMITS" | jq length) + 30 ))
|
|
else
|
|
COUNT=1
|
|
fi
|
|
echo "fetch-depth=$COUNT" >> "$GITHUB_OUTPUT"
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: ${{ steps.pre-checkout.outputs.fetch-depth }}
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 16
|
|
cache: 'npm'
|
|
- run: sudo xcode-select -s /Applications/Xcode_26.0.1.app/Contents/Developer
|
|
- run: scripts/print_env.sh
|
|
- run: npm ci
|
|
- run: npx commitlint --from "$GITHUB_EVENT_BEFORE" --to "$GITHUB_EVENT_AFTER" --verbose
|
|
- run: scripts/ensure_generated_files_are_up_to_date.sh
|
|
- run: scripts/determine_next_version.sh
|
|
- run: scripts/replace_environment_variables_in_app.sh
|
|
- run: scripts/codesign/setup_ci_master.sh
|
|
- run: scripts/run_tests.sh
|
|
- run: scripts/build_app.sh
|
|
- run: scripts/package_and_notarize_release.sh
|
|
- run: scripts/upload_symbols_to_appcenter.sh
|
|
- run: scripts/update_appcast.sh
|
|
- run: scripts/update_readme_and_website.sh
|
|
- run: npx semantic-release
|
|
- id: set_release_info
|
|
run: scripts/extract_latest_changelog.sh
|
|
- uses: softprops/action-gh-release@v3
|
|
with:
|
|
tag_name: ${{ steps.set_release_info.outputs.tag_name }}
|
|
body: ${{ steps.set_release_info.outputs.body }}
|
|
files: ${{ env.XCODE_BUILD_PATH }}/*.zip
|
|
- run: scripts/update_website.sh
|
|
env:
|
|
GH_TOKEN: ${{ secrets.WEBSITE_DISPATCH_TOKEN }}
|