Test #47
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Prepare Release | |
on: | |
push: | |
branches: | |
- "dp/migration_release_pipeline" | |
jobs: | |
prepare: | |
runs-on: macos-latest | |
name: Create Draft Release to store artifacts | |
steps: | |
- name: Delete drafts | |
uses: hugo19941994/delete-draft-releases@v1.0.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: package-release | |
release_name: Release ${{ github.sha }} | |
body: | | |
Pre-release | |
draft: true | |
prerelease: true | |
build-docs: | |
runs-on: ubuntu-latest | |
name: Package docs and upload them to the draft release | |
needs: prepare | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Token | |
id: token | |
uses: yuki0n0/action-appstoreconnect-token@v1.0 | |
with: | |
# UUID. Can get from App Store Connect. | |
issuer id: ${{ secrets.APPLE_STORE_CONNECT_ISSUER_ID }} | |
# Key ID. Can get from App Store Connect. | |
key id: ${{ secrets.APPLE_STORE_CONNECT_KEY_ID }} | |
# P8 private key. Can get from App Store Connect. | |
key: ${{ secrets.APPLE_STORE_CONNECT_API_KEY }} | |
- name: Run release_package-docs_release build and wait for it to finish, then upload the asset to the draft release | |
run: | | |
XCODE_VERSION="$(ruby ./scripts/xcode_cloud_release.rb docs_version)" | |
ruby ./scripts/xcode_cloud_helper.rb --run-release-workflow "release_package-docs_${XCODE_VERSION}" --token ${{ steps.token.outputs.token }} | |
build-examples: | |
runs-on: macos-latest | |
name: Package examples and upload them to the draft release | |
needs: prepare | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- run: echo "GITHUB_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV | |
- run: gem install octokit | |
- run: gem install getoptlong | |
- run: gem install fileutils | |
- run: gem install xcodeproj | |
- name: Pack examples and upload them to the draft release | |
run: ./build.sh package-examples | |
build-source: | |
runs-on: macos-latest | |
name: Package source and upload them to the draft release | |
needs: prepare | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- run: echo "GITHUB_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV | |
- run: gem install octokit | |
- run: gem install getoptlong | |
- name: Pack source and upload them to the draft release | |
run: ./build.sh package-source | |
build-product: | |
runs-on: ubuntu-latest | |
name: Package product for each platform and xcode version. | |
needs: prepare | |
strategy: | |
max-parallel: 5 | |
matrix: | |
xcode-version: ['14.1', '14.2', '14.3.1', '15.0.1', '15.1beta3'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Token | |
id: token | |
uses: yuki0n0/action-appstoreconnect-token@v1.0 | |
with: | |
# UUID. Can get from App Store Connect. | |
issuer id: ${{ secrets.APPLE_STORE_CONNECT_ISSUER_ID }} | |
# Key ID. Can get from App Store Connect. | |
key id: ${{ secrets.APPLE_STORE_CONNECT_KEY_ID }} | |
# P8 private key. Can get from App Store Connect. | |
key: ${{ secrets.APPLE_STORE_CONNECT_API_KEY }} | |
- name: Run release_package_${{ matrix.xcode-version }} build and wait for it to finish, then upload the asset to the draft release | |
run: ruby ./scripts/xcode_cloud_helper.rb --run-release-workflow "release_package_${{ matrix.xcode-version }}" --token ${{ steps.token.outputs.token }} |