Skip to content

Commit

Permalink
Rename to Rosalind
Browse files Browse the repository at this point in the history
  • Loading branch information
pepicrft committed Oct 10, 2024
1 parent fb8879e commit c4c24de
Show file tree
Hide file tree
Showing 18 changed files with 75 additions and 329 deletions.
90 changes: 0 additions & 90 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,90 +0,0 @@
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
runs-on: 'macos-latest'
timeout-minutes: 15
if: "!startsWith(github.event.head_commit.message, '[Release]')"
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 0
- uses: jdx/mise-action@v2
with:
experimental: true
- name: Check if there are releasable changes
id: is-releasable
run: |
# Run git cliff and save the output
bumped_output=$(git cliff --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=false" >> $GITHUB_ENV
else
echo "should-release=true" >> $GITHUB_ENV
fi

- name: Get next version
id: next-version
if: env.should-release == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "NEXT_VERSION=$(git cliff --bumped-version)" >> "$GITHUB_OUTPUT"
- name: Get release notes
id: release-notes
if: env.should-release == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "RELEASE_NOTES<<EOF" >> "$GITHUB_OUTPUT"
git cliff --unreleased >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Update CHANGELOG.md
if: env.should-release == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: git cliff --bump -o CHANGELOG.md
- name: Commit changes
id: auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v5
if: env.should-release == 'true'
with:
commit_options: '--allow-empty'
tagging_message: ${{ steps.next-version.outputs.NEXT_VERSION }}
skip_dirty_check: true
commit_message: "[Release] AppleArtifactAnalyzer ${{ 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/AppleArtifactAnalyzer
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 }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: AppleArtifactAnalyzer
name: Rosalind

on:
push:
Expand All @@ -8,9 +8,9 @@ on:

env:
TUIST_CONFIG_TOKEN: ${{ secrets.TUIST_CONFIG_CLOUD_TOKEN }}

concurrency:
group: apple-bundle-size-analyzer-${{ github.head_ref }}
group: rosalind-${{ github.head_ref }}
cancel-in-progress: true

jobs:
Expand All @@ -36,7 +36,7 @@ jobs:
run: mise run build-spm
- name: Run
if: runner.os == 'Windows'
run: swift build --product AppleArtifactAnalyzer
run: swift build --product Rosalind

build_tuist:
name: "Tuist build"
Expand Down Expand Up @@ -108,4 +108,4 @@ jobs:
with:
experimental: true
- name: Run
run: mise run lint
run: mise run lint
2 changes: 1 addition & 1 deletion .mise/tasks/build-linux
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ docker run --rm \
--workdir "/package" \
swiftlang/swift:nightly-5.10-focal \
/bin/bash -c \
"swift build --product AppleArtifactAnalyzer --build-path ./.build/linux"
"swift build --product Rosalind --build-path ./.build/linux"
2 changes: 1 addition & 1 deletion .mise/tasks/build-spm
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# mise description="Build the project using Swift Package Manager"
set -euo pipefail

swift build --product AppleArtifactAnalyzer --package-path $MISE_PROJECT_ROOT --configuration release
swift build --product Rosalind --package-path $MISE_PROJECT_ROOT --configuration release
2 changes: 1 addition & 1 deletion .mise/tasks/test
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# mise description="Test the project using Tuist"
set -euo pipefail

tuist test AppleArtifactAnalyzer --path $MISE_PROJECT_ROOT
tuist test Rosalind --path $MISE_PROJECT_ROOT
166 changes: 0 additions & 166 deletions CHANGELOG.md

This file was deleted.

16 changes: 8 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
import PackageDescription

let package = Package(
name: "AppleArtifactAnalyzer",
name: "Rosalind",
platforms: [.macOS("13.0")],
products: [
.library(
name: "AppleArtifactAnalyzer",
name: "Rosalind",
type: .static,
targets: ["AppleArtifactAnalyzer"]
),
targets: ["Rosalind"]
)
],
dependencies: [
.package(url: "https://github.com/tuist/Path.git", .upToNextMajor(from: "0.3.4")),
Expand All @@ -20,19 +20,19 @@ let package = Package(
],
targets: [
.target(
name: "AppleArtifactAnalyzer",
name: "Rosalind",
dependencies: [
.product(name: "Path", package: "Path"),
.product(name: "FileSystem", package: "FileSystem"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency"),
.enableExperimentalFeature("StrictConcurrency")
]
),
.testTarget(
name: "AppleArtifactAnalyzerTests",
name: "RosalindTests",
dependencies: [
"AppleArtifactAnalyzer",
"Rosalind"
]
),
]
Expand Down
16 changes: 8 additions & 8 deletions Project.swift
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
import ProjectDescription

let project = Project(
name: "AppleArtifactAnalyzer",
name: "Rosalind",
targets: [
.target(
name: "AppleArtifactAnalyzer",
name: "Rosalind",
destinations: .macOS,
product: .framework,
bundleId: "io.tuist.AppleArtifactAnalyzer",
sources: ["Sources/AppleArtifactAnalyzer/**"],
bundleId: "io.tuist.Rosalind",
sources: ["Sources/Rosalind/**"],
dependencies: [
.external(name: "Path"),
.external(name: "FileSystem"),
.external(name: "Command"),
]
),
.target(
name: "AppleArtifactAnalyzerTests",
name: "RosalindTests",
destinations: .macOS,
product: .unitTests,
bundleId: "io.tuist.AppleArtifactAnalyzerTests",
bundleId: "io.tuist.RosalindTests",
infoPlist: .default,
sources: ["Tests/AppleArtifactAnalyzerTests/**"],
sources: ["Tests/RosalindTests/**"],
resources: [],
dependencies: [.target(name: "AppleArtifactAnalyzer")]
dependencies: [.target(name: "Rosalind")]
),
]
)
Loading

0 comments on commit c4c24de

Please sign in to comment.