-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,11 @@ name: Publish to deno.land/x | |
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Version to publish" | ||
required: true | ||
type: "string" | ||
|
||
defaults: | ||
run: | ||
|
@@ -62,11 +67,15 @@ jobs: | |
git config --global user.name "HatTip Deno Release Bot" | ||
git config --global user.email "<>" | ||
git add . | ||
git diff --quiet && git diff --staged --quiet || git commit -m "sync with hattipjs/hattip ${{ github.sha }}" | ||
# Use the GIT_PUSH_KEY secret deploy key | ||
if [ git diff --quiet && git diff --staged --quiet ]; then | ||
echo "No changes to commit" | ||
exit 0 | ||
fi | ||
git commit -m "sync with hattipjs/hattip ${{ github.sha }}" | ||
git tag v${{ github.event.inputs.version }}" | ||
eval "$(ssh-agent -s)" | ||
ssh-add - <<< "${{ secrets.GIT_PUSH_KEY }}" | ||
ssh-add -l | ||
# Set an SSH remote | ||
git remote set-url origin [email protected]:hattipjs/deno-release.git | ||
git push | ||
git push --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