|
19 | 19 | - "./Sources/Configuration/Versioning.xcconfig"
|
20 | 20 | - "./Sources/Configuration/SentrySwiftUI.xcconfig"
|
21 | 21 | - "./Samples/Shared/Config/Versioning.xcconfig"
|
| 22 | + - "./scripts/bump.sh" |
22 | 23 |
|
23 | 24 | jobs:
|
24 | 25 | run-version-bump:
|
25 |
| - name: Run Version Bump |
| 26 | + # The release workflow uses the Makefile to bump the version so it needs to be tested. |
| 27 | + name: Run Version Bump (Makefile) |
26 | 28 | # We intentionally run this on ubuntu because the release workflow also runs on ubuntu, which uses the version bump util.
|
27 | 29 | runs-on: ubuntu-latest
|
28 | 30 | steps:
|
29 | 31 | - uses: actions/checkout@v4
|
30 | 32 | - name: Generate Version Number
|
| 33 | + id: generate-version-number |
31 | 34 | run: |
|
32 | 35 | TIMESTAMP=$(date +%Y%m%d%H%M%S)
|
33 |
| - echo "VERSION=100.0.$TIMESTAMP" >> $GITHUB_ENV |
| 36 | + echo "VERSION=100.0.$TIMESTAMP" >> $GITHUB_OUTPUT |
34 | 37 | # We don't care which version we bump to, as long as it's a valid semver
|
35 |
| - - run: make bump-version TO=${{ env.VERSION }} |
36 |
| - - run: make verify-version TO=${{ env.VERSION }} |
| 38 | + - run: make bump-version TO=${{ steps.generate-version-number.outputs.VERSION }} |
| 39 | + - run: make verify-version TO=${{ steps.generate-version-number.outputs.VERSION }} |
| 40 | + |
| 41 | + run-version-bump-script: |
| 42 | + # Craft uses the shell script to bump the version so it needs to be tested. |
| 43 | + name: Run Version Bump (Shell Script) |
| 44 | + runs-on: ubuntu-latest |
| 45 | + steps: |
| 46 | + - uses: actions/checkout@v4 |
| 47 | + - name: Generate Version Number |
| 48 | + id: generate-version-number |
| 49 | + run: | |
| 50 | + OLD_VERSION=$(cat ./Sources/Configuration/Versioning.xcconfig | grep MARKETING_VERSION | cut -d '=' -f 2 | tr -d ' ') |
| 51 | + echo "Read old version: ${OLD_VERSION}" |
| 52 | + echo "OLD_VERSION=${OLD_VERSION}" >> $GITHUB_OUTPUT |
| 53 | +
|
| 54 | + NEW_VERSION="100.0.$(date +%Y%m%d%H%M%S)" |
| 55 | + echo "Generated new version: ${NEW_VERSION}" |
| 56 | + echo "NEW_VERSION=${NEW_VERSION}" >> $GITHUB_OUTPUT |
| 57 | +
|
| 58 | + - name: Verify OLD_VERSION is defined |
| 59 | + if: ${{ steps.generate-version-number.outputs.OLD_VERSION == '' }} |
| 60 | + run: | |
| 61 | + echo "OLD_VERSION is not defined. Make sure this script is reading the version from the correct file." |
| 62 | + exit 1 |
| 63 | +
|
| 64 | + - name: Create fake xcframework for update-package-sha.sh |
| 65 | + run: | |
| 66 | + mkdir -p Carthage |
| 67 | + echo "<FAKE STATIC ZIP>" > Carthage/Sentry.xcframework.zip |
| 68 | + echo "<FAKE DYNAMIC ZIP>" > Carthage/Sentry-Dynamic.xcframework.zip |
| 69 | +
|
| 70 | + - name: Bump version |
| 71 | + run: ./scripts/bump.sh ${{ steps.generate-version-number.outputs.OLD_VERSION }} ${{ steps.generate-version-number.outputs.NEW_VERSION }} |
| 72 | + |
| 73 | + - name: Verify outputs of bump.sh |
| 74 | + run: make verify-version TO=${{ steps.generate-version-number.outputs.NEW_VERSION }} |
| 75 | + |
| 76 | + - name: Verify outputs of update-package-sha.sh |
| 77 | + run: | |
| 78 | + ./scripts/verify-package-sha.sh \ |
| 79 | + --static-checksum "7062a80f8a80f8b6d812698af87384751567a6aaa0df6f03b0596d728b22dcfd" \ |
| 80 | + --dynamic-checksum "f6325cd8f05523d60222451fa61b3cd3d58148e5a21236f82abfd3f92750c87c" \ |
| 81 | + --last-release-runid "${{ github.run_id }}" |
0 commit comments