-
Notifications
You must be signed in to change notification settings - Fork 36
29 lines (27 loc) · 1001 Bytes
/
pub-wf.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Test Publish
on:
workflow_dispatch:
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
cd packages/chain-registry
echo "test msg" > msg.txt
cd ../../
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
BRANCH_NAME="build-$(date +%Y%m%d-%H%M%S)"
git checkout -b $BRANCH_NAME
git add .
if ! git diff --staged --quiet; then
git commit -am "build 🛠 $BRANCH_NAME"
git push origin $BRANCH_NAME
gh pr create --base main --head $BRANCH_NAME --title "Automatic build 🛠 $BRANCH_NAME" --body "This is an auto-generated PR with build changes $BRANCH_NAME"
else
echo "No changes to commit."
fi
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_SECRET}}
GH_TOKEN: ${{ secrets.GH_LERNA_PUBLISH_TOKEN }}