Skip to content

Commit

Permalink
Added on demand release action
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrconley committed Dec 11, 2023
1 parent d2a2421 commit 0ea43ec
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/actions/snapshot-release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Snapshot Release
description: Publish a snapshot release
inputs:
tag:
description: 'The tag to use for the snapshot release'
required: true
runs:
using: 'composite'
steps:
- name: Build
shell: bash
run: pnpm build
- name: Version Snapshot
shell: bash
run: pnpm changeset version --snapshot ${{ inputs.tag }}
- name: Snapshot Publish
shell: bash
run: pnpm changeset publish --tag ${{ inputs.tag }} --no-git-tag
36 changes: 36 additions & 0 deletions .github/workflows/on-demand-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: On demand snapshot release
on:
workflow_dispatch:
inputs:
tag:
description: 'The tag to use for the snapshot release'
required: true

env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
jobs:
snapshot:
name: Snapshot Release
runs-on: ubuntu-latest
steps:
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.2.0
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- name: Prepare
run: pnpm i
- name: Publish
uses: ./.github/actions/snapshot-release
with:
tag: ${{ github.event.inputs.tag }}

0 comments on commit 0ea43ec

Please sign in to comment.