Skip to content

Production Release

Production Release #47

Workflow file for this run

name: 'Production Release'
on:
workflow_dispatch:
inputs:
package:
required: true
type: choice
description: Which package should be published?
options:
- vue
- angular
- react
tag:
required: true
type: choice
description: Which npm tag should this be published to?
options:
- latest
- next
preid:
type: choice
description: Which prerelease identifier should be used? This is only needed when version is "prepatch", "preminor", "premajor", or "prerelease".
options:
- ''
- alpha
- beta
- rc
- next
jobs:
prod-build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.prod-build.outputs.version }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: '20.10.0'
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install
shell: bash
- name: Prepare NPM Token
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
shell: bash
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish Package
uses: ./.github/workflows/actions/publish-npm
with:
tag: ${{ inputs.tag }} # "latest" or "next"
preid: ${{ inputs.preid }} # Only needed when version is "prepatch", "preminor", "premajor", or "prerelease"
scope: '@stencil/${{ inputs.package }}-output-target'
# Look at package.json's name
# Coupled to project structure. Update this when adding a new output target.
# Examples: vue-output-target, angular-output-target, react-output-target
working-directory: './packages/${{ inputs.package }}' # Follow the repo structure
token: ${{ secrets.NPM_TOKEN }} # Private, accessible by team leads