feat: implemented rollup for bundling (#7) #38
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: Release | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
verify: | |
name: Verify | |
uses: ./.github/workflows/verify.yml | |
release: | |
name: Release | |
needs: verify | |
permissions: | |
contents: write | |
id-token: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies | |
uses: ./.github/actions/install-deps | |
- name: Create Release Pull Request | |
uses: changesets/action@v1 | |
with: | |
publish: pnpm release | |
createGithubReleases: ${{ github.ref == 'refs/heads/main' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish prerelease | |
if: steps.changesets.outputs.published != 'true' | |
continue-on-error: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN" | |
git reset --hard origin/main | |
pnpm clean | |
pnpm changeset version --no-git-tag --snapshot canary | |
pnpm changeset publish --no-git-tag --snapshot canary --tag canary |