Semantic Release #73
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: Semantic Release | |
on: | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "☁️ checkout repository" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: "🔧 setup Bun" | |
uses: oven-sh/setup-bun@v1 | |
- name: "📦 install dependencies" | |
run: bun install -D @semantic-release/git conventional-changelog-conventionalcommits semantic-release-cargo | |
- name: Get Author Name and Email | |
run: | | |
AUTHOR_NAME=$(git log -1 --pretty=format:%an ${{ github.sha }}) | |
AUTHOR_EMAIL=$(git log -1 --pretty=format:%ae ${{ github.sha }}) | |
echo "AUTHOR_NAME=$AUTHOR_NAME" >> $GITHUB_OUTPUT | |
echo "AUTHOR_EMAIL=$AUTHOR_EMAIL" >> $GITHUB_OUTPUT | |
id: author_info | |
- name: "Semantic release🚀" | |
id: release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }} | |
GIT_COMMITTER_NAME: "github-actions[bot]" | |
GIT_COMMITTER_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" | |
GIT_AUTHOR_NAME: ${{ steps.author_info.outputs.AUTHOR_NAME }} | |
GIT_AUTHOR_EMAIL: ${{ steps.author_info.outputs.AUTHOR_EMAIL }} | |
run: | | |
bun x semantic-release |