forked from hmarr/openai-chat-tokens
-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (35 loc) · 1.22 KB
/
pnpm-version-patch.yaml
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: Node.js Patch
on: workflow_dispatch
jobs:
patch:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY_PRIVATE }}
- uses: pnpm/action-setup@v3
with:
version: latest
- uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 21
- name: Configure Git, patch, release and push
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git config commit.gpgsign true
git config gpg.format ssh
git config user.signingkey 'key::${{ vars.DEPLOY_KEY_PUBLIC }}'
eval `ssh-agent -s`
ssh-add - <<< '${{ secrets.DEPLOY_KEY_PRIVATE }}'
VERSION=$(pnpm version patch --no-git-tag-version)
git commit --all --message "🔖 $VERSION"
git tag --annotate --message "🔖 $VERSION" --sign $VERSION
git push
git push --tags
gh release create $VERSION --generate-notes --title $VERSION --verify-tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}