-
Notifications
You must be signed in to change notification settings - Fork 452
68 lines (58 loc) · 1.89 KB
/
release-please.yml
File metadata and controls
68 lines (58 loc) · 1.89 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
---
name: release-please
on:
push:
branches:
- main
jobs:
create-release:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
id: get-token
with:
private-key: ${{ secrets.TOKENS_PRIVATE_KEY }}
app-id: ${{ secrets.TOKENS_APP_ID }}
- uses: GoogleCloudPlatform/release-please-action@v4
id: release
with:
token: ${{ steps.get-token.outputs.token }}
release-type: node
package-name: netlify-cli
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
needs: create-release
if: ${{ needs.create-release.outputs.release_created }}
steps:
- uses: actions/checkout@v6
- name: Read primary Node version
id: node
run: echo "version=$(yq eval '.primary_node_version' .github/test-matrix.yml)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-node@v6
with:
node-version: ${{ steps.node.outputs.version }}
cache: npm
registry-url: 'https://registry.npmjs.org'
# Use npm@10 due to https://github.com/npm/cli/issues/8489 and https://github.com/npm/cli/issues/8767
- name: Setup npm version
run: npm install -g npm@10
- name: Install core dependencies
run: npm ci --no-audit
- name: Build project
run: npm run build
- name: Publish netlify-cli package
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Prepare netlify package
run: node scripts/netlifyPackage.js
- name: Publish netlify package
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}