-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (88 loc) · 2.51 KB
/
release-beta.yaml
File metadata and controls
108 lines (88 loc) · 2.51 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Release Beta
run-name: 🚀 Release Beta by ${{ github.actor }}
on:
push:
branches:
- beta
paths-ignore:
- docs/**
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
id-token: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: fregante/setup-git-user@v2
- name: Install pnpm
uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 24
cache: "pnpm"
registry-url: "https://npm.pkg.github.com"
scope: "@iamyoki"
- name: Install dependencies
run: pnpm install
- name: Cache lints
id: cache-lints
uses: actions/cache@v4
with:
path: |
.eslintcache
key: ${{ runner.os }}-lints-${{ hashFiles('pnpm*', 'eslint.config.*') }}
restore-keys: |
${{ runner.os }}-lints-
- name: Lint
run: pnpm lint
# - name: Type check
# run: pnpm typecheck
- name: Test
run: pnpm test
- name: Build
run: pnpm build
- name: Pack
run: pnpm pack
- name: Print Environment Info
run: npx nx report
shell: bash
- name: Release (Beta)
run: npx nx release --preid beta --skip-publish
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to github packages
run: |
pnpm pkg set name=@iamyoki/committier
npx nx release publish --tag beta
pnpm pkg set name=committier
shell: bash
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to npm packages
run: |
pnpm pkg set name=committier
pnpm publish --provenance --access public --tag beta --registry https://registry.npmjs.org/
shell: bash
continue-on-error: true
env:
NPM_CONFIG_PROVENANCE: true
- name: Pack
run: pnpm pack
- name: Get tag
id: tag
run: |
TAG_NAME=$(git describe --tags --exact-match)
echo TAG_NAME=$TAG_NAME >> $GITHUB_OUTPUT
- name: Upload release assets
uses: softprops/action-gh-release@v2
if: ${{ steps.tag.outputs.TAG_NAME }}
with:
tag_name: ${{ steps.tag.outputs.TAG_NAME }}
files: "*.tgz"
overwrite_files: false