Credit vChewing for documenting IMK candidate panel pitfalls #12
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: Build | |
| on: | |
| push: | |
| branches: [main, master] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| build: | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Bootstrap (submodules + dictionaries) | |
| run: make bootstrap | |
| - name: Build | |
| run: make build XCFLAGS="CODE_SIGNING_ALLOWED=NO" | |
| - name: Test | |
| run: make test | |
| release: | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: macos-15 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| submodules: recursive | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Bootstrap (submodules + dictionaries) | |
| run: make bootstrap | |
| - name: Build and package | |
| run: make dist XCFLAGS="CODE_SIGNING_ALLOWED=NO" | |
| - name: Extract tag annotation | |
| id: tag_msg | |
| run: | | |
| git fetch origin tag ${GITHUB_REF_NAME} --no-tags --force | |
| echo "body<<ENDOFBODY" >> $GITHUB_OUTPUT | |
| git for-each-ref "refs/tags/${GITHUB_REF_NAME}" --format='%(contents)' >> $GITHUB_OUTPUT | |
| echo "ENDOFBODY" >> $GITHUB_OUTPUT | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: Linguist Zixia Input ${{ github.ref_name }} | |
| files: build/LinguistZixiaInput-*.zip | |
| body: ${{ steps.tag_msg.outputs.body }} |