Skip to content

Commit

Permalink
Fix kotlin/swift release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
wkal-pubnub committed Dec 9, 2024
1 parent aa3102b commit 52dd4eb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release/kotlin-maven-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ find build/cocoapods/publish/release/PubNubChat.xcframework -exec touch -t 00000
rm -f build/cocoapods/publish/release/PubNubChat.xcframework.zip
zip -X -vr build/cocoapods/publish/release/PubNubChat.xcframework.zip build/cocoapods/publish/release/PubNubChat.xcframework
touch -t 00000000 build/cocoapods/publish/release/PubNubChat.xcframework.zip
CHECKSUM=$(swift package compute-checksum /Users/wojciech.kalicinski/projects/pubnub-chat/build/cocoapods/publish/release/PubNubChat.xcframework.zip)
CHECKSUM=$(swift package compute-checksum build/cocoapods/publish/release/PubNubChat.xcframework.zip)
echo $CHECKSUM
mkdir build/gh_artifacts
mv build/cocoapods/publish/release/PubNubChat.xcframework.zip build/gh_artifacts/
2 changes: 1 addition & 1 deletion .github/workflows/release/kotlin-pre-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ find build/cocoapods/publish/release/PubNubChat.xcframework -exec touch -t 00000
rm -f build/cocoapods/publish/release/PubNubChat.xcframework.zip
zip -X -vr build/cocoapods/publish/release/PubNubChat.xcframework.zip build/cocoapods/publish/release/PubNubChat.xcframework
touch -t 00000000 build/cocoapods/publish/release/PubNubChat.xcframework.zip
CHECKSUM=$(swift package compute-checksum /Users/wojciech.kalicinski/projects/pubnub-chat/build/cocoapods/publish/release/PubNubChat.xcframework.zip)
CHECKSUM=$(swift package compute-checksum build/cocoapods/publish/release/PubNubChat.xcframework.zip)
echo $CHECKSUM
sed -i.bak "s/checksum: \"[a-z0-9]*\"/checksum: \"$CHECKSUM\"/g" Package.swift
rm Package.swift.bak
13 changes: 5 additions & 8 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ name: Tests

on:
push:
branches-ignore:
- master
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
Expand Down Expand Up @@ -47,11 +52,3 @@ jobs:
- name: Cancel workflow runs for commit on error
if: failure()
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure
all-tests:
name: Tests
needs: [tests]
runs-on:
group: macos-gh
steps:
- name: Tests summary
run: echo -e "\033[38;2;95;215;0m\033[1mAll tests successfully passed"
40 changes: 3 additions & 37 deletions .github/workflows/run-validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Validations

on:
push:
branches-ignore:
- master
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -33,40 +35,4 @@ jobs:
token: ${{ secrets.GH_TOKEN }}
- name: Cancel workflow runs for commit on error
if: failure()
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure
build-validation:
name: Validate build
runs-on:
group: macos-gh
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '21'
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Validate clean build
run: ./gradlew apiCheck ktlintFormat publishAllPublicationsToRepoRepository -PRELEASE_SIGNING_ENABLED=false
- name: Cancel workflow runs for commit on error
if: failure()
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure
all-validations:
name: Validations
needs: [pubnub-yml, build-validation]
runs-on:
group: macos-gh
steps:
- name: Validations summary
run: echo -e "\033[38;2;95;215;0m\033[1mAll validations passed"
uses: ./.github/.release/actions/actions/utils/fast-jobs-failure

0 comments on commit 52dd4eb

Please sign in to comment.