Skip to content

Commit

Permalink
Remove changesets/action
Browse files Browse the repository at this point in the history
  • Loading branch information
robmosca committed Jul 21, 2023
1 parent 3ad891c commit 1d721d5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .changeset/long-scissors-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@travelperksl/import-map-overrides": patch
---

Fix minor bugs. Add jest tests. Add release automation.
5 changes: 0 additions & 5 deletions .changeset/plenty-nails-lie.md

This file was deleted.

24 changes: 14 additions & 10 deletions .github/workflows/build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ jobs:
name: Release
needs: build_lint_test
permissions:
contents: write # to create release (changesets/action)
pull-requests: write # to create pull request (changesets/action)
contents: write # to push release tags
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/travelperk' }}
steps:
Expand All @@ -70,13 +69,18 @@ jobs:
- name: Build
run: pnpm run build

- name: Create Release Pull Request or Publish to NPM
id: changesets
uses: changesets/action@v1
with:
commit: "Release commit"
title: "Next release"
publish: pnpm run release
- name: Publish to NPM if there is no changeset
run: |
cat << EOF > ".npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
pnpm run changeset status > /dev/null 2>&1
if [ $? -eq 1 ]; then
echo "No changeset found, publishing to NPM"
pnpm run release
git push --follow-tags origin travelperk
else
echo "Changeset found, skipping NPM publish"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 1d721d5

Please sign in to comment.