Skip to content

Commit 6270eac

Browse files
authored
Merge pull request #268 from H1rono/add-assets
🔧 Add release asset of `.crate` file
2 parents e26b900 + 26029c2 commit 6270eac

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/release.yml

+19-1
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,35 @@ jobs:
2525
fi
2626
done
2727
echo "contains=false" >> "$GITHUB_OUTPUT"
28+
prepare-assets:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- run: cargo package -l
33+
- run: |
34+
cargo package --no-verify -p traq-bot-http
35+
mv target/package/*.crate traq-bot-http.crate
36+
- uses: actions/upload-artifact@v4
37+
with:
38+
name: package
39+
path: traq-bot-http.crate
2840
create-release:
2941
runs-on: ubuntu-latest
30-
needs: check-main-branch
42+
needs:
43+
- prepare-assets
44+
- check-main-branch
3145
if: needs.check-main-branch.outputs.contains == 'true'
3246
steps:
3347
- uses: actions/checkout@v4
48+
- uses: actions/download-artifact@v4
49+
with:
50+
name: package
3451
- uses: actions/setup-python@v5
3552
with:
3653
python-version: '3.10'
3754
- run: |
3855
release_note="$(cat CHANGELOG.md | python3 .github/workflows/filter-changelog.py '${{ github.ref_name }}')"
3956
gh release create ${{ github.ref_name }} -d -t ${{ github.ref_name }} -n "$release_note"
57+
gh release upload ${{ github.ref_name }} traq-bot-http.crate
4058
env:
4159
GH_TOKEN: ${{ secrets.PAT }}

0 commit comments

Comments
 (0)