Skip to content

chore: Add github CI and release-please. #1

chore: Add github CI and release-please.

chore: Add github CI and release-please. #1

Workflow file for this run

name: Publish Package
on:
pull_request:
workflow_dispatch:
inputs:
prerelease:
description: 'Is this a prerelease.' # use this to control publish tag, for instance NPM wouldn't set latest.
type: boolean
required: true
dry_run:
description: 'Is this a dry run. If so no package will be published.'
type: boolean
required: true
jobs:
build-publish:
runs-on: ubuntu-latest
# Needed to get tokens during publishing.
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- id: build-and-test
# Build using the same steps from CI.
name: Build and Test
uses: ./.github/actions/ci
- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.0.0
name: 'Get your token!'
with:
# The AWS_ROLE_ARN needs added as a var to your repo.
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
# This example uses the node release token, it will get set into the NODE_AUTH_TOKEN
# environment variable. The action readme contains more information.
ssm_parameter_pairs: '/production/common/releasing/npm/token = NODE_AUTH_TOKEN'
- id: publish
name: Publish Package
uses: ./.github/actions/publish
with:
token: "Put your release secret or github token here."
prerelease: ${{ inputs.prerelease }}
dry_run: ${{ inputs.dry_run }}