chore(deps): update softprops/action-gh-release action to v2.2.1 #53
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*' | |
pull_request: | |
paths: | |
- '.github/workflows/release.yml' | |
permissions: | |
contents: write | |
env: | |
CARGO_INCREMENTAL: 0 | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
needs: gen_doc | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
- name: Release | |
uses: softprops/action-gh-release@v2.2.1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: true | |
prerelease: true | |
generate_release_notes: true | |
publish: | |
runs-on: ubuntu-latest | |
needs: gen_doc | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
- name: Get Rust toolchain | |
id: toolchain | |
run: | | |
awk -F'[ ="]+' '$1 == "channel" { print "toolchain=" $2 }' rust-toolchain >> "$GITHUB_OUTPUT" | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ steps.toolchain.outputs.toolchain }} | |
- name: prepare for package(download jsonschema for docs.rs build) | |
run: | | |
cargo clean | |
cargo build --features build-with-local-schema | |
- name: check downloaded jsonschema | |
run: | | |
ls json_schema/*.jsonschema | |
- name: package | |
run: | | |
cargo package --features build-with-local-schema --allow-dirty | |
- name: check package | |
run: | | |
echo "$ ls"; ls | |
echo "$ ls target/package"; ls target/package/ | |
echo "$ ls target/package/rdfmt-*/json_schema"; ls target/package/rdfmt-*/json_schema | |
- name: publish(dry run) | |
run: | | |
cargo publish --features default,build-with-local-schema --allow-dirty --dry-run | |
- name: publish | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
run: | | |
cargo publish --features default,build-with-local-schema --allow-dirty | |
gen_doc: | |
name: generate document test for docs.rs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
- name: remove rust-toolchain for set docs.rs Rust version | |
run: rm rust-toolchain | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: nightly-2024-06-23 | |
- name: check cargo version | |
run: cargo --version | |
- name: gen doc | |
run: cargo doc |