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
27 changes: 27 additions & 0 deletions .github/workflows/publish-switch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish switch

on:
issue_comment:
types: ["created"]
push:
branches:
- master

permissions:
id-token: write

jobs:
release-snapshot:
if: github.event_name == 'issue_comment'
uses: ./.github/workflows/release-snapshot.yml
secrets: inherit
permissions:
id-token: write
pull-requests: write

release:
if: github.event_name == 'push'
uses: ./.github/workflows/release.yml
secrets: inherit
permissions:
id-token: write
11 changes: 4 additions & 7 deletions .github/workflows/release-snapshot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Release Snapshot

on:
issue_comment:
types: ["created"]
workflow_call:

concurrency: ${{ github.workflow }}-${{ github.ref }}

Expand All @@ -13,6 +12,9 @@ jobs:
${{ github.event.issue.pull_request && github.event.comment.body ==
'/snapshot' }}
runs-on: ubuntu-latest
permissions:
id-token: write
pull-requests: write
steps:
- name: Add initial reaction
uses: peter-evans/create-or-update-comment@v4
Expand Down Expand Up @@ -64,11 +66,6 @@ jobs:
- name: Build packages
run: npm run build

- name: Create .npmrc
run:
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >
~/.npmrc

- name: Publish packages
id: publish
run: |
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Release

on:
push:
branches:
- master
workflow_call:

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout Repo
uses: actions/checkout@v4
Expand All @@ -33,4 +33,3 @@ jobs:
title: Publish Version
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 20.10.0
nodejs 24.11.0