Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ on:
options:
- latest
- test
push:
branches:
- main
paths:
- "**/CHANGELOG.md"

concurrency: publish

Expand Down Expand Up @@ -41,19 +46,19 @@ jobs:
git config --global user.email 'github-actions[bot]@users.noreply.github.com'

- name: version packages
if: inputs.tag != 'latest'
if: inputs.tag == 'test'
run: |
yarn changeset version --snapshot ${{ inputs.tag }}
git commit -a -m 'test'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: npm publish, git tag
run: yarn changeset publish --tag ${{ inputs.tag }}
run: yarn changeset publish --tag ${{ inputs.tag || 'latest' }}

# reset, then we have a tagged dangling commit
- name: git push
if: inputs.tag != 'latest'
if: inputs.tag == 'test'
run: |
git reset HEAD~1 --hard

Expand Down
Loading