chore: release #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: ["v*.*.*"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
uses: ./.github/workflows/test.yml | |
secrets: inherit | |
release_model: | |
name: Add model to release | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download model artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: model | |
- name: Upload release asset | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: model.onnx | |
body: | | |
The only file in this release is the model, `model.onnx`. | |
See [the documentation](https://docs.rs/nsfw) for how to use it. | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publish: | |
name: Publish to crates.io | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup toolchain install stable --profile minimal | |
- run: cargo publish | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |