forked from hmarr/openai-chat-tokens
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (37 loc) · 1.3 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
45
46
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@v4
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 push.gpgSign 'if-asked'
git config tag.gpgSign true
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 }}