Skip to content

promote

promote #1

Workflow file for this run

name: promote
on:
workflow_dispatch:
inputs:
new_tag_name:
description: Name of tag created to be associated with this promotion.
required: true
jobs:
build-and-promote:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NEW_TAG_NAME: ${{ github.event.inputs.new_tag_name }}
steps:
- uses: actions/checkout@v4
- name: Build for promotion
run: yarn install --frozen-lockfile && yarn build
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: GitHub Tag Name example
run: |
echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME"
echo "Tag name from github.ref_name: ${{ github.ref_name }}"
- name: Manual publish
run: |
cd packages/module
npm version "$NEW_TAG_NAME" --git-tag-version false
npm publish --tag=latest