Skip to content

fix: link status .none shouldn't block other dependencies from being … #10

fix: link status .none shouldn't block other dependencies from being …

fix: link status .none shouldn't block other dependencies from being … #10

Workflow file for this run

name: Release
on:
push:
branches:
- main
workflow_dispatch:
inputs:
version:
description: "The version to release"
type: string
permissions:
contents: write
pull-requests: read
statuses: write
packages: write
jobs:
release:
name: Release Tuist App
runs-on: macos-15
timeout-minutes: 50
if: ${{ !contains(github.event.head_commit.message, '[Release] Tuist App') }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.TUIST_APP_RELEASE_TOKEN }}
fetch-depth: 0
- uses: jdx/mise-action@v2
with:
version: 2024.11.8
experimental: true
env:
MISE_HTTP_TIMEOUT: 300
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check if there are releasable changes
id: is-releasable
working-directory: app
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Run git cliff and save the output
bumped_output=$(git cliff --include-path "app/**/*" --repository "../" --bump)
echo "Bumped output:"
echo "${bumped_output}"
# Read the content of CHANGELOG.md
changelog_content=$(cat CHANGELOG.md)
echo "CHANGELOG.md content:"
echo "${changelog_content}"
# Compare the outputs and set the result
if [ "${bumped_output}" != "${changelog_content}" ]; then
echo "should-release=true" >> $GITHUB_ENV
else
echo "should-release=false" >> $GITHUB_ENV
fi
- name: Get next version
working-directory: app
id: next-version
if: env.should-release == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
NEXT_VERSION=$(git cliff --include-path "app/**/*" --repository "../" --bumped-version)
if [ "$NEXT_VERSION" = "0.1.0" ]; then
NEXT_VERSION="[email protected]"
fi
echo "NEXT_VERSION=$NEXT_VERSION" >> "$GITHUB_OUTPUT"
echo "NEXT_VERSION_NUMBER=${NEXT_VERSION#*@}" >> "$GITHUB_OUTPUT"
- name: Get release notes
id: release-notes
if: env.should-release == 'true'
working-directory: app
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "RELEASE_NOTES<<EOF" >> "$GITHUB_OUTPUT"
git cliff --include-path "app/**/*" --repository "../" --unreleased >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Update version
working-directory: app
if: env.should-release == 'true'
run: |
sed -i '' -e "s/CFBundleShortVersionString.*/CFBundleShortVersionString\": \"${{ steps.next-version.outputs.NEXT_VERSION_NUMBER }}\",/g" "Project.swift"
sed -i '' -e "s/CFBundleVersion.*/CFBundleVersion\": \"${{ steps.next-version.outputs.NEXT_VERSION_NUMBER }}\",/g" "Project.swift"
- name: Update CHANGELOG.md
working-directory: app
if: env.should-release == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: git cliff --include-path "app/**/*" --repository "../" --bump -o CHANGELOG.md
- name: Select Xcode
if: env.should-release == 'true'
run: sudo xcode-select -switch /Applications/Xcode_16.1.app
- name: Install dependencies
if: env.should-release == 'true'
run: mise run install
- name: Bundle Tuist App
if: env.should-release == 'true'
run: mise run bundle:app
env:
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APP_SPECIFIC_PASSWORD: ${{ secrets.APP_SPECIFIC_PASSWORD }}
CERTIFICATE_ENCRYPTION_PASSWORD: ${{ secrets.CERTIFICATE_ENCRYPTION_PASSWORD }}
TUIST_CONFIG_TOKEN: ${{ secrets.TUIST_APP_CONFIG_TOKEN }}
- name: Generate Sparkle appcast
if: env.should-release == 'true'
env:
TUIST_APP_PRIVATE_SPARKLE_KEY: ${{ secrets.TUIST_APP_PRIVATE_SPARKLE_KEY }}
run: echo "$TUIST_APP_PRIVATE_SPARKLE_KEY" | .build/artifacts/sparkle/Sparkle/bin/generate_appcast --link https://github.com/tuist/tuist/releases --download-url-prefix https://github.com/tuist/tuist/releases/download/${{ steps.next-version.outputs.NEXT_VERSION }}/Tuist.dmg -o app/appcast.xml app/build/artifacts --ed-key-file -
- name: Commit changes
id: auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v5
if: env.should-release == 'true'
with:
tagging_message: ${{ steps.next-version.outputs.NEXT_VERSION }}
commit_message: "[Release] [skip ci] Tuist App ${{ steps.next-version.outputs.NEXT_VERSION }}"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
if: env.should-release == 'true'
with:
draft: false
repository: tuist/tuist
name: ${{ steps.next-version.outputs.NEXT_VERSION }}
tag_name: ${{ steps.next-version.outputs.NEXT_VERSION }}
body: ${{ steps.release-notes.outputs.RELEASE_NOTES }}
target_commitish: ${{ steps.auto-commit-action.outputs.commit_hash }}
files: |
app/build/artifacts/Tuist.dmg
app/build/artifacts/SHASUMS256.txt
app/build/artifacts/SHASUMS512.txt
- name: Release Homebrew cask
if: env.should-release == 'true'
run: mise run workspace:release:homebrew-cask --version ${{ steps.semvers.outputs.version }} --github-token ${{ secrets.TUIST_HOMEBREW_APP_CASK_RELEASE_TOKEN }} --sha256 ${{ steps.sha256.outputs.sha256 }}