Skip to content

Production Release

Production Release #32

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
version:
required: true
type: choice
description: Which version should be published?
options:
- patch
- minor
- major
- prepatch
- preminor
- premajor
- prerelease
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
version: 9
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
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:
version: ${{ inputs.version }} # "patch", "minor", "major", "prepatch", "preminor", "premajor", "prerelease"
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 }}-output-target' # Follow the repo structure
token: ${{ secrets.NPM_TOKEN }} # Private, accessible by team leads