Skip to content

Commit

Permalink
Merge pull request #268 from H1rono/add-assets
Browse files Browse the repository at this point in the history
🔧 Add release asset of `.crate` file
  • Loading branch information
H1rono authored Dec 24, 2024
2 parents e26b900 + 26029c2 commit 6270eac
Showing 1 changed file with 19 additions and 1 deletion.
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 }}

0 comments on commit 6270eac

Please sign in to comment.