-
-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (71 loc) · 2.25 KB
/
lint_release.yml
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Linting and Release
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
env:
CI: true
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Biome rules build & format
run: cd ./packages/eslint-config-node && pnpm exec biome migrate eslint --write --include-inspired --include-nursery && pnpm exec biome check biome.json --write --config-path=../biome-config/biome.json
- name: Lint code
run: pnpm run lint
release:
permissions:
id-token: write
contents: write
needs: lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Release
env:
GIT_USERNAME: ${{ vars.GIT_USERNAME }}
GIT_EMAIL: ${{ vars.GIT_EMAIL }}
SSH_PUBLIC_KEY: ${{ secrets.SSH_PUBLIC_KEY }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_KEY_PASSPHRASE: ${{ secrets.SSH_KEY_PASSPHRASE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
shell: bash
run: |
git clone https://github.com/dalisoft/release-me.git --depth 1 .release-me
pnpm run release