Release 0.9.1 #18
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: | |
- "*" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v2 | |
- name: Run build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Run cargo doc | |
uses: actions-rs/cargo@v1 | |
with: | |
command: doc | |
args: --no-deps | |
- name: Compress rustdoc output | |
run: | | |
tar cvjf target/rust_docs.tar.bz2 target/doc | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload build | |
id: upload_build | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./target/release/rpick | |
asset_name: rpick-x86_64-unknown-linux-gnu | |
asset_content_type: application/octet-stream | |
- name: Upload Rust docs | |
id: upload_rust_docs | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./target/rust_docs.tar.bz2 | |
asset_name: docs.tar.bz2 | |
asset_content_type: application/octet-stream | |
- name: Upload CHANGELOG.md | |
id: upload_changelog | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: CHANGELOG.md | |
asset_name: CHANGELOG.md | |
asset_content_type: text/markdown | |
- name: Upload README.md | |
id: upload_readme | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: README.md | |
asset_name: README.md | |
asset_content_type: text/markdown | |
- name: Publish to crates.io | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
uses: actions-rs/cargo@v1 | |
with: | |
command: publish | |
- name: Configure Cargo registry for deschamps | |
run: | | |
echo -e '[registries.deschamps]\nindex = "https://git.deschamps.network/crates/index.git"' >> ~/.cargo/config | |
- name: Publish to deschamps | |
env: | |
CARGO_REGISTRIES_DESCHAMPS_TOKEN: ${{ secrets.DESCHAMPS_CARGO_REGISTRY_TOKEN }} | |
uses: actions-rs/cargo@v1 | |
with: | |
command: publish | |
args: --registry deschamps |