Skip to content

Commit 0a4428c

Browse files
authored
Merge pull request #10 from stainless-commons/release-please--branches--main--changes--next--components--spotify
release: 0.4.0
2 parents a29f450 + ea25f71 commit 0a4428c

9 files changed

Lines changed: 73 additions & 10 deletions

File tree

.github/workflows/publish-npm.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This workflow is triggered when a GitHub release is created.
2+
# It can also be run manually to re-publish to NPM in case it failed for some reason.
3+
# You can run this workflow by navigating to https://www.github.com/stainless-commons/spotify-typescript/actions/workflows/publish-npm.yml
4+
name: Publish NPM
5+
on:
6+
workflow_dispatch:
7+
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
publish:
13+
name: publish
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
id-token: write
18+
19+
steps:
20+
- uses: actions/checkout@v6
21+
22+
- name: Set up Node
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: '20'
26+
27+
- name: Set up pnpm
28+
uses: pnpm/action-setup@v4
29+
30+
- name: Install dependencies
31+
run: |
32+
pnpm install
33+
34+
- name: Publish to NPM
35+
run: |
36+
bash ./bin/publish-npm

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.3.0"
2+
".": "0.4.0"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 97
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless-commons%2Fspotify-7ac9fe2ee73e38b2892f0393435f2d3a275d04b1d0728708382dd752da1d44de.yml
33
openapi_spec_hash: 6be3d4faa079ee82335208bec39c917a
4-
config_hash: e9eed48b634d363c8fb0052e81544e1e
4+
config_hash: 130d32e101fcd29858ba4453473724d6

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 0.4.0 (2026-02-23)
4+
5+
Full Changelog: [v0.3.0...v0.4.0](https://github.com/stainless-commons/spotify-typescript/compare/v0.3.0...v0.4.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([b4f6afb](https://github.com/stainless-commons/spotify-typescript/commit/b4f6afb96fb21aa111d93905698b3e473fa07e8e))
10+
311
## 0.3.0 (2026-02-23)
412

513
Full Changelog: [v0.2.2...v0.3.0](https://github.com/stainless-commons/spotify-typescript/compare/v0.2.2...v0.3.0)

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,17 @@ To format and fix all lint issues automatically:
8585
```sh
8686
$ pnpm fix
8787
```
88+
89+
## Publishing and releases
90+
91+
Changes made to this repository via the automated release PR pipeline should publish to npm automatically. If
92+
the changes aren't made through the automated pipeline, you may want to make releases manually.
93+
94+
### Publish with a GitHub workflow
95+
96+
You can release to package managers by using [the `Publish NPM` GitHub action](https://www.github.com/stainless-commons/spotify-typescript/actions/workflows/publish-npm.yml). This requires a setup organization or repository secret to be set up.
97+
98+
### Publish manually
99+
100+
If you need to manually release a package, you can run the `bin/publish-npm` script with an `NPM_TOKEN` set on
101+
the environment.

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ It is generated with [Stainless](https://www.stainless.com/).
1111
## Installation
1212

1313
```sh
14-
npm install git+ssh://git@github.com:stainless-commons/spotify-typescript.git
14+
npm install @stainless-commons/spotify
1515
```
1616

17-
> [!NOTE]
18-
> Once this package is [published to npm](https://www.stainless.com/docs/guides/publish), this will become: `npm install @stainless-commons/spotify`
19-
2017
## Usage
2118

2219
The full API of this library can be found in [api.md](api.md).

bin/publish-npm

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
set -eux
44

5-
npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
5+
if [[ ${NPM_TOKEN:-} ]]; then
6+
npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
7+
elif [[ ! ${ACTIONS_ID_TOKEN_REQUEST_TOKEN:-} ]]; then
8+
echo "ERROR: NPM_TOKEN must be set if not running in a Github Action with id-token permission"
9+
exit 1
10+
fi
611

712
pnpm build
813
cd dist
@@ -57,5 +62,8 @@ else
5762
TAG="latest"
5863
fi
5964

65+
# Install OIDC compatible npm version
66+
npm install --prefix ../oidc/ npm@11.6.2
67+
6068
# Publish with the appropriate tag
61-
pnpm publish --no-git-checks --tag "$TAG"
69+
pnpm publish --npm-path "$(cd ../ && pwd)/oidc/node_modules/.bin/npm" --no-git-checks --tag "$TAG"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stainless-commons/spotify",
3-
"version": "0.3.0",
3+
"version": "0.4.0",
44
"description": "Stainless Commons TypeScript SDK for the Spotify API",
55
"author": "Spotify <commons@stainless.com>",
66
"types": "dist/index.d.ts",

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '0.3.0'; // x-release-please-version
1+
export const VERSION = '0.4.0'; // x-release-please-version

0 commit comments

Comments
 (0)