diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 474d8529c..4fdd23299 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,9 +37,33 @@ jobs: echo "MAS_VERSION: ${MAS_VERSION}" echo "RELEASE_COMMIT: ${RELEASE_COMMIT}" + version-update: + runs-on: macos-14 + needs: [start] + steps: + - uses: actions/checkout@v4 + with: + # A fetch-depth of 0 includes all history and tags for script/version + fetch-depth: 0 + + - name: 🔖 version + run: | + script/version_bump "${MAS_VERSION}" "${RELEASE_COMMIT}" + +# branch_name="releases/release-${MAS_VERSION}" +# $echo git branch "${branch_name}" +# $echo git switch "${branch_name}" + +# $echo git add \ +# "${SWIFT_PACKAGE}" \ +# "${LOCAL_MAS_FORMULA_PATH}" \ +# "${LOCAL_TAP_FORMULA_PATH}" + +# $echo git commit --message="🔖 Version ${MAS_VERSION}" + pkg-installer: runs-on: macos-14 - needs: start + needs: [version-update] steps: - uses: actions/checkout@v4 with: @@ -68,7 +92,7 @@ jobs: homebrew-tap: runs-on: macos-14 - needs: [start] + needs: [version-update] steps: - uses: actions/checkout@v4 with: @@ -92,7 +116,7 @@ jobs: homebrew-core: runs-on: macos-14 - needs: [start, homebrew-tap] + needs: [version-update, homebrew-tap] steps: - uses: actions/checkout@v4 with: diff --git a/script/brew_core_update b/script/brew_core_update index 9a7a99ee4..e2fafc611 100755 --- a/script/brew_core_update +++ b/script/brew_core_update @@ -14,9 +14,7 @@ CORE_FORMULA_PATH="${CORE_TAP_PATH}/Formula/" CORE_MAS_FORMULA_PATH="${CORE_FORMULA_PATH}/m/mas.rb" PROJECT_PATH="$(git rev-parse --show-toplevel)" -SWIFT_PACKAGE="${PROJECT_PATH}/Sources/MasKit/Package.swift" LOCAL_MAS_FORMULA_PATH="${PROJECT_PATH}/Homebrew/mas.rb" -LOCAL_TAP_FORMULA_PATH="${PROJECT_PATH}/Homebrew/mas-tap.rb" function usage { echo "Usage: brew_core_update [-d] v0.0 [sha1_hash]" @@ -74,24 +72,6 @@ fi echo "REVISION: ${REVISION}" -################################################################################ -# -# Update Version -# - -script/version_bump "${MAS_VERSION}" "${REVISION}" - -branch_name="releases/release-${MAS_VERSION}" -$echo git branch "${branch_name}" -$echo git switch "${branch_name}" - -$echo git add \ - "${SWIFT_PACKAGE}" \ - "${LOCAL_MAS_FORMULA_PATH}" \ - "${LOCAL_TAP_FORMULA_PATH}" - -$echo git commit --message="🔖 Version ${MAS_VERSION}" - ################################################################################ # # Preflight checks diff --git a/script/version_bump b/script/version_bump index 7d1404714..62fc39348 100755 --- a/script/version_bump +++ b/script/version_bump @@ -7,7 +7,7 @@ # PROJECT_PATH="$(git rev-parse --show-toplevel)" -PACKAGE_MANIFEST="${PROJECT_PATH}/Sources/MasKit/Package.swift" +SWIFT_PACKAGE="${PROJECT_PATH}/Sources/MasKit/Package.swift" LOCAL_MAS_FORMULA_PATH="${PROJECT_PATH}/Homebrew/mas.rb" LOCAL_TAP_FORMULA_PATH="${PROJECT_PATH}/Homebrew/mas-tap.rb" @@ -38,7 +38,7 @@ echo "MAS_VERSION: ${MAS_VERSION}" echo "REVISION: ${REVISION}" # Write new version into swift package -cat <"${PACKAGE_MANIFEST}" +cat <"${SWIFT_PACKAGE}" // Generated by: script/version enum Package { static let version = "${MAS_VERSION#v}" @@ -46,7 +46,7 @@ enum Package { EOF echo -cat "${PACKAGE_MANIFEST}" +cat "${SWIFT_PACKAGE}" # Write new version into brew formulae for file in ${LOCAL_MAS_FORMULA_PATH} ${LOCAL_TAP_FORMULA_PATH}; do