Continuous Deployment #15
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: Continuous Deployment | |
on: | |
push: | |
tags: | |
- "*.*.*" | |
# We need this to be able to create releases. | |
permissions: | |
contents: write | |
jobs: | |
generate-changelog: | |
name: Generate changelog | |
runs-on: ubuntu-latest | |
outputs: | |
release_body: ${{ steps.git-cliff.outputs.content }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Generate a changelog | |
uses: orhun/git-cliff-action@main | |
id: git-cliff | |
with: | |
config: cliff.toml | |
args: --latest --no-exec --github-repo ${{ github.repository }} | |
env: | |
OUTPUT: CHANGES.md | |
github-release: | |
name: Github Release | |
runs-on: ubuntu-latest | |
needs: generate-changelog | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Create GitHub Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
shell: bash | |
run: | | |
release_body="${{ needs.generate-changelog.outputs.release_body }}" | |
gh release create ${{ github.ref_name }} --verify-tag --notes "$release_body" | |
publish-crates-io: | |
name: Publish on crates.io | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- run: | | |
cargo publish -p jarust_rt --token ${CRATES_TOKEN} | |
cargo publish -p jarust_transport --token ${CRATES_TOKEN} | |
cargo publish -p jarust --token ${CRATES_TOKEN} | |
cargo publish -p jarust_plugins --token ${CRATES_TOKEN} | |
env: | |
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} |