Skip to content

Commit

Permalink
feat: added continues deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghamza-Jd committed Apr 1, 2024
1 parent b4115fc commit fcd535d
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Continuous Deployment

on:
push:
tags:
- "*.*.*"

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: -vv --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: Upload release archive
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
gh release create ${{ github.ref_name }} --verify-tag --notes {{ needs.generate-changelog.outputs.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 --token ${CRATES_TOKEN}
cargo publish -p jarust_make_plugin --token ${CRATES_TOKEN}
cargo poublish -p jarust_plugins --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
1 change: 1 addition & 0 deletions cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->πŸš€ Features" },
{ message = "^fix", group = "<!-- 1 -->πŸ› Bug Fixes" },
{ message = "^doc", group = "<!-- 3 -->πŸ“š Documentation" },
{ message = "^docs", group = "<!-- 3 -->πŸ“š Documentation" },
{ message = "^perf", group = "<!-- 4 -->⚑ Performance" },
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
Expand Down

0 comments on commit fcd535d

Please sign in to comment.