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
12 changes: 4 additions & 8 deletions .github/actions/publish-types/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ inputs:
VERSION:
description: Packages version
required: true
NODE_AUTH_TOKEN:
description: Node auth token
required: true
runs:
using: composite
steps:
Expand All @@ -29,20 +26,19 @@ runs:
jq --arg version "${{ inputs.VERSION }}" '.dependencies."@dop251/types-goja_nodejs-global" = $version' $pkg/types/package.json > $pkg/types/tmp.json && mv $pkg/types/tmp.json $pkg/types/package.json
done
- name: Setup nodejs
uses: actions/setup-node@v2
uses: actions/setup-node@v6
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- name: Publish the packages
shell: bash
run: |
npm install -g npm@11.5.1
cd global-types
npm publish --access=public
npm publish ---tag latest --access=public
cd -
for pkg in ${{ steps.vars.outputs.PKGS }}; do
cd $pkg/types
npm publish --access=public
npm publish --tag latest --access=public
cd -
done
env:
NODE_AUTH_TOKEN: ${{ inputs.NODE_AUTH_TOKEN }}
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
on: [push, pull_request]
name: Test

permissions:
id-token: write # Required for OIDC
contents: read

jobs:
test:
strategy:
Expand Down Expand Up @@ -60,7 +65,6 @@ jobs:
if: env.version != ''
with:
VERSION: ${{ env.version }}
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

publish-types-untagged:
name: 'Publish type definitions to npm (untagged master)'
Expand All @@ -76,4 +80,3 @@ jobs:
- uses: './.github/actions/publish-types'
with:
VERSION: ${{ env.version }}
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
Loading