星流平台(aicp):查询训练任务增加GPU类型,排序方式;云函数(kcf):上线弹性伸缩相关接口; #27
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: Auto Release | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get version from composer.json | |
| id: get_version | |
| run: | | |
| VERSION=$(jq -r '.version' composer.json) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "tag=v$VERSION" >> $GITHUB_OUTPUT | |
| echo "Version: $VERSION" | |
| echo "Tag: v$VERSION" | |
| - name: Check if tag exists | |
| id: check_tag | |
| run: | | |
| if git rev-parse "v${{ steps.get_version.outputs.version }}" >/dev/null 2>&1; then | |
| echo "exists=true" >> $GITHUB_OUTPUT | |
| echo "Tag v${{ steps.get_version.outputs.version }} already exists" | |
| else | |
| echo "exists=false" >> $GITHUB_OUTPUT | |
| echo "Tag v${{ steps.get_version.outputs.version }} does not exist" | |
| fi | |
| - name: Create and push tag | |
| if: steps.check_tag.outputs.exists == 'false' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag -a "${{ steps.get_version.outputs.tag }}" -m "Release ${{ steps.get_version.outputs.tag }}" | |
| git push origin "${{ steps.get_version.outputs.tag }}" | |
| - name: Create GitHub Release | |
| if: steps.check_tag.outputs.exists == 'false' | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.get_version.outputs.tag }} | |
| release_name: ${{ steps.get_version.outputs.tag }} | |
| draft: false | |
| prerelease: false | |
| body: | | |
| Release version ${{ steps.get_version.outputs.version }} | |
| ## Changes | |
| Please refer to the commit history for detailed changes. | |
| - name: Skip - Tag already exists | |
| if: steps.check_tag.outputs.exists == 'true' | |
| run: | | |
| echo "Tag ${{ steps.get_version.outputs.tag }} already exists, skipping release creation." |