Spaces:
Sleeping
Sleeping
Download .github/workflows/create-release.yml from derrickliu/stock_analysis: direct link, hf CLI and curl.
- Browser
- Download file 1.23 kB
-
https://huggingface.co/spaces/derrickliu/stock_analysis/resolve/main/.github/workflows/create-release.yml
- Command line
-
hf download hf://spaces/derrickliu/stock_analysis/.github/workflows/create-release.yml
-
curl -L -o create-release.yml https://huggingface.co/spaces/derrickliu/stock_analysis/resolve/main/.github/workflows/create-release.yml
1.23 kB
| name: Create GitHub Release from Tag | |
| # Trigger: annotated tag pushed (vX.Y.Z) | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Extract tag annotation message | |
| id: tag_body | |
| run: | | |
| TAG="${GITHUB_REF_NAME}" | |
| # Get full annotation message (body only, strip first line if it's just the version) | |
| BODY="$(git tag -l --format='%(contents)' "$TAG")" | |
| if [[ -z "${BODY// }" ]]; then | |
| echo "No annotation message found for $TAG, using default." | |
| BODY="See CHANGELOG for details." | |
| fi | |
| # Write to file to safely handle multi-line content | |
| printf '%s' "$BODY" > /tmp/release_body.txt | |
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.tag_body.outputs.tag }} | |
| name: ${{ steps.tag_body.outputs.tag }} | |
| body_path: /tmp/release_body.txt | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: false | |