25
25
run : |
26
26
export NEXT_VERSION="$(/bin/git-version --folder=$PWD --release-branch=master)"
27
27
echo "Next version is ${NEXT_VERSION}"
28
- echo "${NEXT_VERSION}" > . version
28
+ echo "${NEXT_VERSION}" > next- version.txt
29
29
echo "version=${NEXT_VERSION}" >> $GITHUB_ENV
30
30
- name : Get next npm tag name
31
31
run : |
@@ -37,15 +37,15 @@ jobs:
37
37
export PUBLISH_TAG="pr"
38
38
fi
39
39
echo "Next tag is ${PUBLISH_TAG}"
40
- echo "${PUBLISH_TAG}" > . tag
40
+ echo "${PUBLISH_TAG}" > publish- tag.txt
41
41
- name : Upload versions
42
42
uses : actions/upload-artifact@v3
43
43
with :
44
44
name : versions
45
45
if-no-files-found : error
46
46
path : |
47
- . version
48
- . tag
47
+ next- version.txt
48
+ publish- tag.txt
49
49
50
50
build :
51
51
runs-on : ubuntu-latest
86
86
with :
87
87
name : versions
88
88
- name : Store version
89
- run : echo "version=$(cat . version)" >> $GITHUB_ENV
89
+ run : echo "version=$(cat next- version.txt )" >> $GITHUB_ENV
90
90
- name : Configure Git
91
91
run : |
92
92
git config user.email "gh-actions@users.noreply.github.com"
@@ -115,9 +115,9 @@ jobs:
115
115
- name : Version package
116
116
run : |
117
117
# Update version in packages to publish
118
- npm version $(cat . version) -m "Release version %s"
118
+ npm version $(cat next- version.txt ) -m "Release version %s"
119
119
- name : Publish to NPM
120
- run : npm publish --tag $(cat . tag)
120
+ run : npm publish --tag $(cat publish- tag.txt )
121
121
- uses : actions/setup-node@v3
122
122
with :
123
123
node-version : ' 18.x'
@@ -136,8 +136,8 @@ jobs:
136
136
run : |
137
137
# HACK: Override npm package name to be able to publish in GitHub
138
138
sed -i 's/^ "name":.*/ "name": "@rtfpessoa\/diff2html",/g' package.json
139
- echo "Going to publish version $(cat . version) to GitHub"
140
- npm publish --tag $(cat . tag)
139
+ echo "Going to publish version $(cat next- version.txt ) to GitHub"
140
+ npm publish --tag $(cat publish- tag.txt )
141
141
# HACK: Restore npm package name
142
142
sed -i 's/^ "name":.*/ "name": "diff2html",/g' package.json
143
143
- name : Upload docs
0 commit comments