@mia-platform-internal/fast-data-secret-js tagged at version: 0.2.0-rc0 #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tag CI | |
env: | |
context: './' | |
cache-name: cache-release | |
node-version: 20.x | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
on: | |
push: | |
tags: | |
- 'v**' | |
jobs: | |
next-version: | |
runs-on: ubuntu-latest | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
outputs: | |
version: ${{ steps.get-version.outputs.version }} | |
steps: | |
- name: Compute tag version | |
id: get-version | |
run: | | |
VERSION=${GITHUB_REF#refs/tags/} | |
echo "version=$(echo ${VERSION} | sed s/^v//)" >> $GITHUB_OUTPUT | |
release-npm-package: | |
name: Release package on npm | |
runs-on: ubuntu-latest | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Extract tag name | |
id: extract_tag | |
shell: bash | |
run: echo "tag=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT | |
- name: Use Node.js ${{ env.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.node-version }} | |
cache: yarn | |
- name: Install | |
run: yarn install --immutable | |
- name: Build | |
run: yarn build | |
- name: Publish | |
run: yarn npm publish |