-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add snapshot release workflow (#7999)
Co-authored-by: Mitchell Hamilton <mitchell@hamil.town> Co-authored-by: Daniel Cousens <dcousens@users.noreply.github.com>
- Loading branch information
Showing
7 changed files
with
73 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Publish (Snapshot) | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'The npm tag to publish to' | ||
required: true | ||
|
||
jobs: | ||
publish_snapshot: | ||
name: Publish (Snapshot) | ||
runs-on: ubuntu-latest | ||
environment: release | ||
steps: | ||
- uses: actions/checkout@main | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: true # needed for git push | ||
|
||
- uses: ./.github/actions/ci-setup | ||
|
||
- name: version packages | ||
run: yarn changeset version --snapshot ${{ inputs.tag }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.KEYSTONE_RELEASE_BOT_GITHUB_TOKEN }} | ||
|
||
- name: git commit | ||
run: | | ||
git config --global user.name 'Keystonejs Release Bot' | ||
git config --global user.email 'automation+keystonejs@thinkmill.com.au' | ||
git commit -a -m 'rc' | ||
- run: yarn build | ||
|
||
- name: npm publish, git tag | ||
run: yarn changeset publish --tag ${{ inputs.tag }} | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
# reset, then push the dangling commit | ||
- name: git push | ||
run: | | ||
git reset HEAD~1 --hard | ||
git push origin --tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aef70b8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
keystone-next-docs – ./
keystone-6.vercel.app
keystone-next-docs-git-main-thinkmill.vercel.app
keystone-next-docs-thinkmill.vercel.app
www.keystonejs.com
next.keystonejs.com
keystonejs.com
demo.keystonejs.com