diff --git a/.github/workflows/experimental.yml b/.github/workflows/experimental.yml index 5e6ec9aaf..ca1707b8e 100644 --- a/.github/workflows/experimental.yml +++ b/.github/workflows/experimental.yml @@ -1,16 +1,14 @@ name: Publish Experimental Package to npmjs env: - NPM_CONFIG_PROVENANCE: true + NPM_CONFIG_PROVENANCE: true on: workflow_dispatch: - # release: - # types: [published] + release: + types: [published] jobs: build: runs-on: ubuntu-latest - permissions: - id-token: write steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v3 @@ -26,6 +24,32 @@ jobs: ${{ runner.os }}-node- - run: yarn + publish: + if: github.event_name == 'release' + runs-on: ubuntu-latest + permissions: + id-token: write + needs: + - build + steps: + - name: Publish dockview-core + run: npm publish --provenance + working-directory: packages/dockview-core + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Publish dockview + run: npm publish --provenance + working-directory: packages/dockview + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + publish-experimental: + if: github.event_name == 'workflow_dispatch' + runs-on: ubuntu-latest + permissions: + id-token: write + needs: + - build + steps: - run: npm run set-experimental-versions - name: Publish dockview-core run: npm publish --provenance --tag experimental