Skip to content

Setup trusted publishing to NPM (#92) #89

Setup trusted publishing to NPM (#92)

Setup trusted publishing to NPM (#92) #89

Workflow file for this run

name: Main Flow
on:
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
permissions: {}
jobs:
build:
if: github.repository_owner == 'Effect-Ts'
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/setup
with:
registry-url: "https://registry.npmjs.org"
- name: Upgrade npm for OIDC support
run: npm install -g npm@latest
- name: Type check
run: tsc --noEmit
- run: pnpm build
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
version: pnpm run version
publish: pnpm exec changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}