Skip to content

Release Snapshot

Release Snapshot #14

# https://github.com/anthonyhastings/turborepo-design-system
name: Release Snapshot
on:
workflow_dispatch:
inputs:
tag:
description: 'NPM tag'
default: ''
jobs:
snapshot:
name: Snapshot Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/gh-setup
- name: Build
run: yarn build
- id: variables
run: echo "tag=${{ github.event.inputs.tag != '' && github.event.inputs.tag || github.ref_name }}" >> $GITHUB_OUTPUT
- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Snapshot Release
run: |
yarn run version-packages --snapshot "${{ steps.variables.outputs.tag }}"
echo '---'
echo 'Detected Changes:'
git diff
echo '---'
yarn run publish --tag "${{ steps.variables.outputs.tag }}" --no-git-tag