name: Pre-release on: push: branches: - beta - dev-changesets concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: release: name: PR or Release if: ${{ github.repository_owner == 'tabler' }} runs-on: ubuntu-latest permissions: contents: write pull-requests: write steps: - name: Checkout Repo uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: bundler-cache: true - name: Enable corepack run: corepack enable pnpm - name: Setup Node.js 18 uses: actions/setup-node@v4 with: cache: 'pnpm' node-version: 18 registry-url: 'https://registry.npmjs.org' - name: Install Dependencies run: pnpm install - name: Build Package run: pnpm run build - name: Enable Pre-release run: pnpm changeset pre enter beta - name: Creating .npmrc run: | cat << EOF > "$HOME/.npmrc" //registry.npmjs.org/:_authToken=$NPM_TOKEN EOF env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Create Release Pull Request uses: changesets/action@v1 with: # Note: pnpm install after versioning is necessary to refresh lockfile version: pnpm run version publish: pnpm release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_CONFIG_PROVENANCE: true