-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (57 loc) · 1.7 KB
/
publish.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
54
55
56
57
58
59
60
name: Publish
on:
push:
branches:
- 'dev'
jobs:
publish:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
permissions:
contents: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
# run_install: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Configure git
run: |
git config user.name ${{github.actor}}
git config user.email ${{github.actor}}@users.noreply.github.com
- name: check version and tags
run: |
grep "version" package.json
git tag -l
git ls-remote --tags
- name: Release
run: pnpm release
- name: git status
run: |
git status
git tag -l
git ls-remote --tags
- name: Extract version
uses: issue-ops/[email protected]
id: extract-version
with:
manifest-path: package.json
overwrite: true
- name: Print version
run: echo ${{ steps.extract-version.outputs.version }}
- name: Check status for v${{ steps.extract-version.outputs.version }}
# run: gh release create v${{ steps.extract-version.outputs.version }} -t v${{ steps.extract-version.outputs.version }} -n "Release v${{ steps.extract-version.outputs.version }}"
run: git status