Skip to content

Commit

Permalink
chore(uikit canary version): update gh actions (#2916)
Browse files Browse the repository at this point in the history
* chore(uikit canary version): update gh actions

* chore(uikit canary version): remove duplicate publishing rule

* chore(uikit canary version): add a commit string trigger

---------

Co-authored-by: Ddouglasz <[email protected]>
  • Loading branch information
ddouglasz and Ddouglasz authored Sep 18, 2024
1 parent 5e1134b commit f592574
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions .github/workflows/preview-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,28 +74,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }}

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: dotansimha/[email protected]
with:
commit: 'ci(changesets): version packages'
publish: yarn changeset publish
version: yarn changeset:version-and-format
createGithubReleases: aggregate
githubReleaseName: v${{ steps.release_version.outputs.VALUE }}
githubTagName: v${{ steps.release_version.outputs.VALUE }}
env:
GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }}
SKIP_POSTINSTALL_DEV_SETUP: true

# Publish canary releases only if the packages weren't published already
# Publish preview releases only if the branch starts with "preview/" and packages weren't published already
- name: Publishing preview releases to npm registry
if: steps.changesets.outputs.published != 'true' && startsWith(github.ref, 'refs/heads/preview/')
if: startsWith(github.ref, 'refs/heads/preview/') && contains(github.event.head_commit.message, '[publish_preview]')
run: |
BRANCH_NAME=$(echo "${GITHUB_REF#refs/heads/}" | tr '/' '-')
DATE=$(date +"%Y%m%d")
git checkout ${{ github.head_ref }}
yarn changeset version --snapshot "0.0.0-${BRANCH_NAME}-${DATE}"
yarn changeset version --snapshot ${BRANCH_NAME}"
yarn changeset publish --tag preview
env:
GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }}

0 comments on commit f592574

Please sign in to comment.