Add A TestFlight Link #318
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: Add A TestFlight Link | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| app_name: | |
| description: '应用名称(可选,如不填则自动提取)' | |
| required: false | |
| default: 'None' | |
| testflight_link: | |
| description: 'TestFlight 公共测试的完整链接(非 TestFlight 链接请添加到 data/signup.md)' | |
| required: true | |
| jobs: | |
| main: | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'pluwen/awesome-testflight-link' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: pip install -r scripts/requirements.txt | |
| - name: Add TestFlight Link | |
| run: python scripts/add_link.py "${{ github.event.inputs.testflight_link }}" "${{ github.event.inputs.app_name }}" | |
| - name: Commit and push changes | |
| run: | | |
| if [ -n "$(git status --porcelain)" ]; then | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-actions[bot]" | |
| git add . | |
| git commit -m "Add new TestFlight link: ${{ github.event.inputs.app_name }}" | |
| git push | |
| else | |
| echo "No changes to commit" | |
| fi |