Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions .github/workflows/typescript_package_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,37 @@ on:
- master
paths:
- "models/typescript/**"

# Npm authentication via OpenID Connect (OIDC)
# https://docs.npmjs.com/trusted-publishers
permissions:
id-token: write # Required for OIDC
contents: read

jobs:
build-publish:
name: build-publish-job
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: |
cd ./scripts
yarn

- name: Load secrets from 1Password
uses: 1password/[email protected]
with:
export-env: true # Export loaded secrets as environment variables
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
NODE_AUTH_TOKEN: "op://rbiv7rvkkrsdlpcrz3bmv7nmcu/ppzc4jxrwkf3omdmcs7z2wiwum/credential"

# Ensure npm 11.5.1 or later is installed for OIDC support
- name: Update npm
run: npm install -g [email protected]

- name: Publish to npm
run: cd ./models/typescript && npm publish
env:
NODE_AUTH_TOKEN: ${{ env.NODE_AUTH_TOKEN }}

2 changes: 1 addition & 1 deletion models/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![npm version](https://badge.fury.io/js/gbfs-typescript-types.svg)](http://badge.fury.io/js/gbfs-typescript-types)

TypeScript types for parsing and working with General Bikeshare Feed Specification (GBFS) data, ensuring type safety and code consistency in TypeScript projects.
TypeScript types for parsing and working with General Bikeshare Feed Specification (GBFS) data, ensuring type safety and code consistency in TypeScript projects

## Add the Dependency

Expand Down
2 changes: 1 addition & 1 deletion models/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gbfs-typescript-types",
"version": "1.0.12",
"version": "1.0.14",
"description": "Language Bindings for GBFS in Typescript.",
"keywords": [
"gbfs",
Expand Down