Skip to content

type-safe check of the latest properties #69

type-safe check of the latest properties

type-safe check of the latest properties #69

---
name: publish-to-npm
on:
push:
branches: [main]
permissions:
id-token: write
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ vars.RP_AWS_CRED_REGION }}
role-to-assume: arn:aws:iam::${{ secrets.RP_AWS_CRED_ACCOUNT_ID }}:role/${{ vars.RP_AWS_CRED_BASE_ROLE_NAME }}${{ github.event.repository.name }}
- uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
secret-ids: |
,sdlc/prod/github/npm_token
parse-json-secrets: true
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org/'
- run: npm install
- uses: JS-DevTools/npm-publish@v3
id: publish
with:
token: ${{ env.NPM_TOKEN }}
- name: Check published version
if: ${{ steps.publish.outputs.type }}
run: echo "Version changed!"
dispatch:
needs: publish
strategy:
matrix:
repo: ['redpanda-data/docs', 'redpanda-data/cloud-docs', 'redpanda-data/rp-connect-docs']
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ vars.RP_AWS_CRED_REGION }}
role-to-assume: arn:aws:iam::${{ secrets.RP_AWS_CRED_ACCOUNT_ID }}:role/${{ vars.RP_AWS_CRED_BASE_ROLE_NAME }}${{ github.event.repository.name }}
- uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
secret-ids: |
,sdlc/prod/github/actions_bot_token
parse-json-secrets: true
- uses: peter-evans/repository-dispatch@v3
with:
token: ${{ env.ACTIONS_BOT_TOKEN }}
repository: ${{ matrix.repo }}
event-type: trigger-npm-update
client-payload: '{"commit_sha": "${{ github.sha }}"}'