-
Notifications
You must be signed in to change notification settings - Fork 4
68 lines (57 loc) · 2.03 KB
/
Copy pathrelease.yaml
File metadata and controls
68 lines (57 loc) · 2.03 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
# SPDX-FileCopyrightText: Copyright 2024 SAP SE or an SAP affiliate company and cobaltcore-dev contributors
#
# SPDX-License-Identifier: Apache-2.0
name: Release
on:
push:
branches:
- main
env:
HUSKY: 0
NODE_VERSION: "24"
PNPM_VERSION: "10.33.0"
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: write
pull-requests: write
id-token: write # required for npm trusted publishing via OIDC
jobs:
release:
name: Release
runs-on: ubuntu-latest
environment: npm-publish
outputs:
published: ${{ steps.changesets.outputs.published }}
publishedPackages: ${{ steps.changesets.outputs.publishedPackages }}
steps:
- name: Generate GitHub App Token
id: github-app-token
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3
with:
app-id: ${{ secrets.COBALTCORE_APP_ID }}
private-key: ${{ secrets.COBALTCORE_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
- name: Checkout Repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: "https://registry.npmjs.org"
- name: Setup PNPM
uses: ./.github/actions/setup-pnpm
with:
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}
- name: Build
run: pnpm build
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
with:
publish: pnpm release
title: "publish(npm): automate Package Versioning and Publishing with Changesets"
commit: "chore(version): update versions with Changesets"
env:
GITHUB_TOKEN: ${{ steps.github-app-token.outputs.token }}