Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 Add release asset of .crate file #268

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,35 @@ jobs:
fi
done
echo "contains=false" >> "$GITHUB_OUTPUT"
prepare-assets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo package -l
- run: |
cargo package --no-verify -p traq-bot-http
mv target/package/*.crate traq-bot-http.crate
- uses: actions/upload-artifact@v4
with:
name: package
path: traq-bot-http.crate
create-release:
runs-on: ubuntu-latest
needs: check-main-branch
needs:
- prepare-assets
- check-main-branch
if: needs.check-main-branch.outputs.contains == 'true'
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: package
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: |
release_note="$(cat CHANGELOG.md | python3 .github/workflows/filter-changelog.py '${{ github.ref_name }}')"
gh release create ${{ github.ref_name }} -d -t ${{ github.ref_name }} -n "$release_note"
gh release upload ${{ github.ref_name }} traq-bot-http.crate
env:
GH_TOKEN: ${{ secrets.PAT }}
Loading