Merge pull request #108 from donatik27/main #103
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish on github | |
on: | |
push: | |
branches: | |
- main | |
- beta | |
jobs: | |
publish-gpr: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: pnpm/action-setup@v2.0.1 | |
with: | |
version: 8.8.0 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 20.0.0 | |
cache: pnpm | |
registry-url: https://npm.pkg.github.com/ | |
scope: "@storyprotocol" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm build | |
- name: Publish to npm | |
run: | | |
cd packages/storykit | |
if [[ "${{ github.ref }}" == "refs/heads/beta" ]]; then | |
npm publish --tag beta | |
elif [[ "${{ github.ref }}" == "refs/heads/main" ]]; then | |
npm publish --tag latest | |
fi | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} |