-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (67 loc) · 2.23 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Publish
on:
push:
tags:
- '[1-9]+.[0-9]+.[0-9]+'
- '!**-xcodebuild-**'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
concurrency:
group: ${{ github.ref_name }}
jobs:
ensure-tag-is-on-main:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
with:
ref: main
fetch-depth: 0
- run: exit $(git merge-base --is-ancestor $GITHUB_REF_NAME HEAD)
update-xcframeworks-and-create-tags:
runs-on: macos-14-xlarge
needs: [ ensure-tag-is-on-main ]
permissions:
contents: write
strategy:
fail-fast: false
matrix:
xcodeversion: [ 14.3.1, 15.0.1, 15.1, 15.2, 15.3 ]
steps:
- uses: actions/[email protected]
- uses: maxim-lobanov/[email protected]
with:
xcode-version: ${{ inputs.xcodeversion }}
- uses: ./.github/actions/runGradleTask
with:
preTaskString: -Pversion=$GITHUB_REF_NAME
task: :library:assembleTidalNetworkTimeReleaseXCFramework
- run: |
git config --local user.name $GITHUB_ACTOR
git config --local user.email [email protected]
git add -f library/build/XCFrameworks/release/TidalNetworkTime.xcframework
git commit -m "XCFramework update for version $GITHUB_REF_NAME-xcodebuild-${{ matrix.xcodeversion }}"
git tag $GITHUB_REF_NAME-xcodebuild-${{ matrix.xcodeversion }} -m $GITHUB_REF_NAME-xcodebuild-${{ matrix.xcodeversion }}
git push origin tag $GITHUB_REF_NAME-xcodebuild-${{ matrix.xcodeversion }}
create-github-release:
runs-on: ubuntu-22.04
needs: [ update-xcframeworks-and-create-tags ]
permissions:
contents: write
steps:
- uses: actions/[email protected]
with:
ref: ${{ github.ref_name }}
- run: .scripts/github/release.sh
publish-maven-publications:
runs-on: macos-14-xlarge
needs: [ update-xcframeworks-and-create-tags ]
permissions:
packages: write
steps:
- uses: actions/[email protected]
with:
ref: ${{ github.ref_name }}
- uses: ./.github/actions/runGradleTask
with:
preTaskString: -Pversion=$GITHUB_REF_NAME
task: :library:publishAllPublicationsToGithubPackagesRepository