generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 34
53 lines (44 loc) · 1.26 KB
/
manual-create-release.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
47
48
49
50
51
52
53
name: Manually create release
on:
workflow_dispatch:
inputs:
tag:
description: Name of the tag to use for the next release
required: true
type: string
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: 'master'
fetch-depth: 0
- name: Check that the last commit is not tagged
run: |
if [[ $(git describe --tags) == $(git describe --tags --abbrev=0) ]]; then
exit 1
fi
- uses: actions/setup-node@v3
with:
node-version: "lts/*"
- uses: pnpm/action-setup@v2
with:
version: latest
run_install: false
- name: Update version
run: |
pnpm install --frozen-lockfile
pnpm run version ${{ inputs.tag }}
- name: Configure git credentials
run: |
git config --global user.name 'Github Action'
git config --global user.email 'marc0l92@users.noreply.github.com'
- name: Commit and push changes
run: |
git status
git add .
git commit -m "Update release version to ${{ inputs.tag }}"
git push
git tag ${{ inputs.tag }}
git push --tags