Skip to content

Commit

Permalink
chore: update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkelawala committed Feb 15, 2024
1 parent 0ab2d0d commit e87b9b7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
10 changes: 10 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"mode": "pre",
"tag": "next",
"initialVersions": {
"get-starknet-example": "2.1.2",
"get-starknet-core": "3.2.0",
"get-starknet": "3.0.1"
},
"changesets": []
}
27 changes: 20 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- master
- next

jobs:
version:
Expand All @@ -22,21 +23,33 @@ jobs:
node-version: 16
cache: "pnpm"
- name: Setup npmrc
run:
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_ACCESS_TOKEN
}}" >> .npmrc
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_ACCESS_TOKEN }}" >> .npmrc
- name: install dependencies
run: pnpm install
- name: run tests
run: pnpm test
- name: copy readme to every package
run: echo "./packages/core/ ./packages/ui/" | xargs -n 1 cp README.md
- name: create and publish versions

- name: Create Pre-release
if: github.ref == 'refs/heads/next'
uses: changesets/action@v1
with:
version: pnpm run version
commit: "chore: pre-release version bump"
title: "Pre-release version bump"
publish: pnpm publish --tag next
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
if: github.ref == 'refs/heads/master'
uses: changesets/action@v1
with:
version: pnpm run version
commit: "chore: update versions"
title: "chore: update versions"
publish: pnpm run publish
commit: "chore: release version bump"
title: "Release version bump"
publish: pnpm publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e87b9b7

Please sign in to comment.