Skip to content

Production Release

Production Release #84

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
- ssr
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@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.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: ${{ inputs.package == 'ssr' && '@stencil/ssr' || format('@stencil/{0}-output-target', inputs.package) }}
# 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