publish-release #82
Workflow file for this run
This file contains hidden or 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: publish-release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'release tag' | |
| required: false | |
| type: string | |
| commitId: | |
| description: 'specific commit ID to build' | |
| required: false | |
| type: string | |
| release: | |
| types: [published] | |
| jobs: | |
| get-version: | |
| runs-on: lynx-ubuntu-22.04-medium | |
| timeout-minutes: 60 | |
| outputs: | |
| version: ${{ steps.get_version.outputs.VERSION }} | |
| steps: | |
| - name: Get Version | |
| id: get_version | |
| run: |- | |
| if [ ${{ github.event_name }} == 'workflow_dispatch' ]; then | |
| version=${{ github.event.inputs.tag }} | |
| else | |
| version=$(echo ${{ github.ref }} | awk -F "/" '{print $3}') | |
| fi | |
| if [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ || \ | |
| $version =~ ^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$ || \ | |
| $version =~ ^[0-9]+\.[0-9]+\.[0-9]+-alpha\.[0-9]+$ ]]; then | |
| echo "Version is valid" | |
| echo "VERSION=$version" >> $GITHUB_OUTPUT; | |
| else | |
| echo "Version is invalid" | |
| exit 1 | |
| fi | |
| ios-sdk-publish: | |
| timeout-minutes: 60 | |
| runs-on: macos-14 | |
| needs: get-version | |
| steps: | |
| - name: Download Source | |
| uses: actions/checkout@v4.2.2 | |
| with: | |
| ref: ${{ github.event.inputs.commitId || github.ref }} | |
| fetch-depth: 0 | |
| path: lynx | |
| - name: Python Setup | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Set up Ruby + specify Bundler version | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '2.6.10' | |
| - name: Install Common Dependencies | |
| uses: ./lynx/.github/actions/common-deps | |
| with: | |
| cache-backend: github | |
| - name: Setup Ruby Cache | |
| uses: ./lynx/.github/actions/ios-common-deps | |
| with: | |
| cache-backend: 'github' | |
| - name: Publish iOS SDK | |
| uses: ./lynx/.github/actions/ios-sdk-publish | |
| with: | |
| version: ${{ needs.get-version.outputs.version }} | |
| tag: ${{ needs.get-version.outputs.version }} | |
| cocoapods_trunk_token: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| component: Lynx |