Skip to content

Commit 7a10314

Browse files
committed
feat(ci): add simple publish workflow + add userAgent
1 parent eb42f5e commit 7a10314

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

.github/workflows/publish.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: "publish"
3+
4+
on:
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-22.04
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: "Set up Node"
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 20.x
18+
registry-url: "https://registry.npmjs.org"
19+
20+
- name: "Install dependencies"
21+
run: npm ci
22+
23+
- name: "Publish package on NPM"
24+
run: npm publish --access public
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "serverless-scaleway-functions",
3-
"version": "0.4.12",
3+
"version": "0.4.13",
44
"description": "Provider plugin for the Serverless Framework v1.x which adds support for Scaleway Functions.",
55
"main": "index.js",
66
"author": "scaleway.com",

shared/api/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ const runtimesApi = require("./runtimes");
1414
// Registry
1515
const RegistryApi = require("./registry");
1616

17+
const version = "0.4.13";
18+
1719
function getApiManager(apiUrl, token) {
1820
return axios.create({
1921
baseURL: apiUrl,
2022
headers: {
23+
"User-Agent": `serverless-scaleway-functions/${version}`,
2124
"X-Auth-Token": token,
2225
},
2326
httpsAgent: new https.Agent({

0 commit comments

Comments
 (0)