name: Publish a new pod version on: push: branches: - main - master workflow_dispatch: jobs: release-pod: runs-on: macos-latest steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - run: git config --global user.email "noreply@gonative.io" - run: git config --global user.name "gonative-bot" - name: Configure ruby uses: ruby/setup-ruby@v1 with: ruby-version: 3.1.2 - name: Install gonative-cli run: gem install gonative-cli - name: Install cocoapods run: gem install cocoapods - name: Get version run: echo "version=$(gonative ios version)" >> "$GITHUB_ENV" - name: Check if tag already exists run: git show-ref --tags --verify --quiet -- "refs/tags/${{ env.version }}" && echo "tagged=1" >> "$GITHUB_ENV" || echo "tagged=0" >> "$GITHUB_ENV" - name: Install SSH key uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.POD_SPEC_SECRET_KEY }} known_hosts: unnecessary - name: Add gonative-specs repo run: pod repo add gonative-specs git@github.com:gonativeio/gonative-specs.git - name: Publish pod if: env.tagged == 0 run: gonative ios publish --debug - name: Upload build directory if: failure() uses: actions/upload-artifact@v3 with: name: build-dir path: build retention-days: 5