Skip to content

Commit

Permalink
Trying changeset release in acitons
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisli30 committed Aug 22, 2023
1 parent 48c122a commit a9abfeb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/npm-publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ jobs:
- name: 🛠️ Build
run: npm run build

- name: Publish all packages
run: |
for dir in packages/*; do
if [ -d "$dir" ]; then
echo "Publishing $dir package"
cd "$dir"
npm publish --tag dev
cd ..
fi
done
- name: Publish packages to NPM with dev tag
id: changesets
uses: changesets/action@v1
with:
version: npm run changeset:version
publish: npm run changeset:publish-dev
env:
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN_CHRIS }}

12 changes: 3 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,10 @@ jobs:

- run: npm ci --ignore-scripts

- name: Set Git Ref
id: set-ref
run: echo "::set-output name=ref::${{ github.event.inputs.ref }}"

- name: Create Release Pull Request or Publish to npm
- name: Create Release Pull Request
id: changesets
uses: changesets/action@v1
with:
version: npm run changeset:version
publish: npm run changeset:publish
#with:
#version: npm run changeset:version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN_CHRIS }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"test": "npm run build && jest --verbose --runInBand ./test/functional",
"changeset": "changeset",
"changeset:version": "changeset version && npm i --package-lock-only",
"changeset:publish": "npm run build && changeset publish"
"changeset:publish": "npm run build && changeset publish",
"changeset:publish-dev": "npm run build && changeset publish --tag dev"
},
"devDependencies": {
"@babel/preset-env": "^7.19.4",
Expand Down

0 comments on commit a9abfeb

Please sign in to comment.