Skip to content

Commit

Permalink
feat: create release
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwolf-x committed Nov 22, 2024
1 parent 4878e1d commit 95aad81
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/fairseq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: fairseq
on: [workflow_dispatch, push, pull_request]
jobs:
build:
name: Build for multiple Python versions
name: Build fairseq
runs-on: windows-latest
strategy:
matrix:
Expand All @@ -14,6 +14,10 @@ jobs:
- run: |
python -m pip install --upgrade "pip<24.1"
pip install fairseq
run: |
# 记录fairseq版本到env
fairseq_version=$(python -c "import fairseq; print(fairseq.__version__)")
echo "fairseq_version=$fairseq_version" >> $GITHUB_ENV
- run: |
python -c "import torch; print(f'Using torch version: {torch.__version__}')"
continue-on-error: true
Expand All @@ -22,3 +26,15 @@ jobs:
name: Windows whl
path: fairseq-*.whl
if-no-files-found: error

- name: Create GitHub Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: fairseq-*.whl
tag: fairseq-${{ env.fairseq_version }}
name: Release fairseq-${{ env.fairseq_version }}
body: |
This release contains the fairseq wheel for version ${{ env.fairseq_version }} with python ${{ matrix.python-version }}
draft: false
prerelease: false

0 comments on commit 95aad81

Please sign in to comment.