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
32 changes: 26 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ name: Publish

on:
workflow_dispatch:
inputs:
tag:
description: 'The npm tag to publish to'
required: true
type: choice
options:
- latest
- test

permissions:
contents: write
Expand All @@ -11,7 +19,8 @@ jobs:
publish:
name: Publish
runs-on: ubuntu-latest
environment: release
timeout-minutes: 10
environment: Release
steps:
- uses: actions/checkout@main
with:
Expand All @@ -27,10 +36,21 @@ jobs:
git config --global user.name 'Thinkmill Release Bot'
git config --global user.email 'automation+github@thinkmill.com.au'

- name: npm publish, git tag
run: pnpm changeset publish
- name: version packages
if: inputs.tag != 'latest'
run: |
pnpm changeset version --snapshot ${{ inputs.tag }}
git commit -a -m 'rc'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: npm publish, git tag
run: pnpm changeset publish --tag ${{ inputs.tag }}

# reset, then we have a tagged dangling commit
- name: git push
if: inputs.tag != 'latest'
run: |
git reset HEAD~1 --hard

- run: git push origin --follow-tags
- run: git push origin --tags
45 changes: 0 additions & 45 deletions .github/workflows/publish_snapshot.yml

This file was deleted.

Loading