Skip to content

Commit

Permalink
chore: add canary publishing to toolbar (#1275)
Browse files Browse the repository at this point in the history
  • Loading branch information
icehaunter committed May 16, 2024
1 parent b966157 commit f4e9e28
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/toolbar_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,20 @@ jobs:
run: make deps
- name: Run tests
run: make tests
maybe_publish:
runs-on: ubuntu-latest
needs: [test, check_types, verify_formatting]
if: ${{ github.ref_name == 'main' }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: make deps
- run: pnpm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"
- run: make publish-canary

8 changes: 8 additions & 0 deletions components/toolbar/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ check_styleguide:

tests:
CI=true pnpm run test

INFERRED_VERSION = $(shell git rev-parse --short HEAD)
publish-canary:
pnpm version prerelease --preid canary
jq --arg a "${INFERRED_VERSION}" '.version = (.version | sub("(-canary.*)"; "-canary." + $$a))' package.json > package.json.tmp
mv package.json.tmp package.json
pnpm publish --tag canary --access public --no-git-checks --force

0 comments on commit f4e9e28

Please sign in to comment.