-
Notifications
You must be signed in to change notification settings - Fork 59
44 lines (38 loc) · 1.4 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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