-
Notifications
You must be signed in to change notification settings - Fork 4
131 lines (130 loc) · 4.82 KB
/
Copy pathnpm.yml
File metadata and controls
131 lines (130 loc) · 4.82 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: "Publish to npm"
on:
release:
types: [published]
push:
tags:
- "*.*.*-build.*"
jobs:
release:
name: Publish stable release
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Set up NodeJS LTS
uses: actions/setup-node@v6
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"
- name: Update npm package manager
run: npm install -g npm@latest
- name: Checkout
uses: actions/checkout@v7
- name: Install pnpm
run: npm install -g pnpm
- name: Set pnpm store-dir path
run: mkdir -p ~/.pnpm-store && pnpm config set store-dir ~/.pnpm-store
- name: Install dependencies
run: pnpm install --no-lockfile
- name: Bump @filteringdev/tinyshield package.json version from tag
uses: TypescriptPrime/bump-packagejson-version@72720c4d073ed0c5b9e9393d7334abfe3fabb47c
- name: Bump @filteringdev/tinyshield-lib package.json version from tag
run: npm pkg set version="${GITHUB_REF_NAME#v}" -w libs
- name: Build
run: npm run build
- name: Publish @filteringdev/tinyshield to npm
working-directory: .
run: npm publish --access public
- name: Publish @filteringdev/tinyshield-lib to npm
working-directory: libs
run: npm publish --access public
if: ${{ github.event_name == 'release' && github.event.release.prerelease == false }}
beta-release:
name: Publish beta release
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Set up NodeJS LTS
uses: actions/setup-node@v6
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"
- name: Update npm package manager
run: npm install -g npm@latest
- name: Checkout
uses: actions/checkout@v7
- name: Install pnpm
run: npm install -g pnpm
- name: Set pnpm store-dir path
run: mkdir -p ~/.pnpm-store && pnpm config set store-dir ~/.pnpm-store
- name: Install dependencies
run: pnpm install --no-lockfile
- name: Bump @filteringdev/tinyshield package.json version from tag
uses: TypescriptPrime/bump-packagejson-version@72720c4d073ed0c5b9e9393d7334abfe3fabb47c
- name: Bump @filteringdev/tinyshield-lib package.json version from tag
run: npm pkg set version="${GITHUB_REF_NAME#v}" -w libs
- name: Build
run: npm run build
- name: Publish @filteringdev/tinyshield to npm
working-directory: .
run: npm publish --tag beta --access public
- name: Publish @filteringdev/tinyshield-lib to npm
working-directory: libs
run: npm publish --tag beta --access public
if: ${{ github.event_name == 'release' && github.event.release.prerelease == true && contains(github.event.release.tag_name, '-beta.') }}
build-release:
name: Build release (no publish)
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Set up NodeJS LTS
uses: actions/setup-node@v6
with:
node-version: "lts/*"
registry-url: "https://registry.npmjs.org"
- name: Update npm package manager
run: npm install -g npm@latest
- name: Checkout
uses: actions/checkout@v7
- name: Install pnpm
run: npm install -g pnpm
- name: Set pnpm store-dir path
run: mkdir -p ~/.pnpm-store && pnpm config set store-dir ~/.pnpm-store
- name: Install dependencies
run: pnpm install --no-lockfile
- name: Bump @filteringdev/tinyshield package.json version from tag
uses: TypescriptPrime/bump-packagejson-version@72720c4d073ed0c5b9e9393d7334abfe3fabb47c
- name: Bump @filteringdev/tinyshield-lib package.json version from tag
run: npm pkg set version="${GITHUB_REF_NAME#v}" -w libs
- name: Build
run: npm run build
- name: Publish @filteringdev/tinyshield to npm
working-directory: .
run: npm publish --tag build --access public
- name: Publish @filteringdev/tinyshield-lib to npm
working-directory: libs
run: npm publish --tag build --access public
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && contains(github.ref, '-build.') }}
purge:
name: Purge jsdelivr cache
runs-on: ubuntu-latest
permissions:
contents: read
actions: read
steps:
- name: Set up NodeJS LTS
uses: actions/setup-node@v6
with:
node-version: "lts/*"
- name: Purge jsdelivr cache
uses: FilteringDev/jsdelivr-purge-npm@0bee790e911f359243cd8d98cd87f6bbbc879e80
with:
package: "@filteringdev/tinyshield"
disttag: "latest"
needs: [release]