Add A TestFlight Link #315
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 TestFilght Link | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| app_name: | |
| description: '应用名称(建议填上,程序可能无法通过链接判断 TestFlight 测试的应用名称)【中间不要有英文双引号或英文竖线分隔符"|"】' | |
| required: false | |
| default: 'None' | |
| testflight_link: | |
| description: 'Testflight 公共测试的完整链接(非 TestFilght 链接请添加到 data/signup.md)' | |
| required: true | |
| table: | |
| description: '链接分类' | |
| required: true | |
| type: choice | |
| options: | |
| - macos | |
| - ios | |
| - ios_game | |
| - tvos | |
| - chinese | |
| 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.table }}" "${{ 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 |