File tree 2 files changed +12
-12
lines changed
2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 16
16
jobs :
17
17
npm :
18
18
runs-on : ubuntu-latest
19
-
20
19
steps :
21
20
- uses : actions/checkout@v4
22
21
with :
@@ -43,12 +42,12 @@ jobs:
43
42
env :
44
43
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
45
44
46
- # TODO: uncomment
47
- # run: yarn changelogithub
48
- # env:
49
- # GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
45
+ - run : yarn changelogithub
46
+ env :
47
+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
50
48
51
49
forge :
50
+ runs-on : ubuntu-latest
52
51
steps :
53
52
- uses : actions/checkout@v4
54
53
- uses : fregante/setup-git-user@v2.0.1
Original file line number Diff line number Diff line change @@ -19,25 +19,26 @@ clean() {
19
19
maybe_publish_forge_pkg () {
20
20
pkg=" $1 "
21
21
version=$( jq -r ' .version' " packages/$pkg /package.json" )
22
- current_branch=$( git branch --show-current)
23
22
latest_commit_msg=$( git log -1 --pretty=%B)
24
23
25
24
git checkout -b " $pkg "
26
25
# return early if latest already published
27
26
[ " $latest_commit_msg " = " $version " ] && return
28
- git status
29
- git pull --rebase origin " $pkg "
27
+ git pull --rebase origin " $pkg " 2> /dev/null || true
30
28
clean " $pkg "
31
- mv " packages/$pkg " /src .
32
- mv " packages/$pkg " /README.md .
29
+ mkdir " $pkg "
30
+ mv " packages/$pkg " /src " $pkg "
31
+ mv " packages/$pkg " /README.md " $pkg "
32
+ mv LICENSE " $pkg "
33
33
rm -fr " packages"
34
- git add src
34
+ git add " $pkg "
35
35
git commit -am " $version "
36
36
git push origin " $pkg "
37
- git checkout " $current_branch "
37
+ git checkout origin/ " $GITHUB_HEAD_REF "
38
38
}
39
39
40
40
main () {
41
+ git fetch origin " $GITHUB_HEAD_REF "
41
42
# http://mywiki.wooledge.org/BashFAQ/001
42
43
# https://github.com/koalaman/shellcheck/wiki/SC2012
43
44
find packages -maxdepth 1 -mindepth 1 -printf ' %P\n' | while read -r pkg; do
You can’t perform that action at this time.
0 commit comments