-
Notifications
You must be signed in to change notification settings - Fork 15
62 lines (52 loc) · 1.76 KB
/
Copy pathrelease.yml
File metadata and controls
62 lines (52 loc) · 1.76 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
name: Release
on:
push:
branches: [ alpha, beta ]
permissions:
id-token: write # Required for OIDC
contents: write # needed by @semantic-release/github to needed to push tags/version commits
issues: write # needed by @semantic-release/github
pull-requests: write # needed if semantic-release comments on PRs
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '22' ]
name: Release with Node version ${{ matrix.node }}
steps:
- name: Checkout CLI
uses: actions/checkout@v4
with:
repository: apimatic/apimatic-cli
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
fetch-depth: 0
path: cli
- name: setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: enable corepack
run: corepack enable
- name: configure pnpm cache
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
cache-dependency-path: cli/pnpm-lock.yaml
- name: Install dependencies
working-directory: cli
run: pnpm install --frozen-lockfile
- name: Check Build
working-directory: 'cli'
run: pnpm build
# npm trusted publishing (OIDC) requires npm >= 11.5.1; the runner's bundled
# npm (shipped with Node 22) is older, so upgrade it before publishing.
- name: Upgrade npm for OIDC trusted publishing
run: npm install -g npm@latest
- name: Release
working-directory: cli
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm exec semantic-release