Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Create Version PR

on:
push:
branches:
- main

jobs:
version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22.x'
- run: yarn install --frozen-lockfile
- name: Create version PR
uses: changesets/action@v1
with:
commit: 'chore: version packages'
title: 'chore: version packages'
env:
GITHUB_TOKEN: ${{ secrets.WORKSPACE_TOKEN }}
39 changes: 8 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,31 @@ on:
push:
branches:
- main
pull_request:
types: [closed]

permissions:
id-token: write
contents: write
actions: write
id-token: write

jobs:
createReleasePR:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn install --frozen-lockfile
- name: Create Release Pull Request or Publish
uses: changesets/action@v1
with:
publish: yarn workspaces run build
commit: 'chore: version packages'
title: 'chore: version packages'
env:
GITHUB_TOKEN: ${{ secrets.WORKSPACE_TOKEN }}
version:
if: "contains(github.event.head_commit.message, 'chore: version packages')"

publish:
needs: createReleasePR
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.pull_request.merged == true && contains(github.event.pull_request.title, 'chore: version packages')
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'

- run: yarn install --frozen-lockfile
- name: Publish packages

- name: Publish packages to npm
uses: changesets/action@v1
with:
publish: |
cd packages/tsconfig && npm publish --access public --provenance
cd ../inscriptions && npm publish --access public --provenance
publish: yarn changeset publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}