-
Notifications
You must be signed in to change notification settings - Fork 38
36 lines (34 loc) · 1.04 KB
/
release-snapshot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# 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