Commit 83629d8 1 parent c0dea69 commit 83629d8 Copy full SHA for 83629d8
File tree 2 files changed +13
-8
lines changed
2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 38
38
run : |
39
39
TAG_EXISTS=$(git tag -l "${{ inputs.tag }}")
40
40
if [[ -n "$TAG_EXISTS" ]]; then
41
- echo "::error::The tag ${{ inputs.tag }} has already been released "
41
+ echo "::error::The tag ${{ inputs.tag }} already exists "
42
42
exit 1
43
43
fi
44
44
- name : Ensure version is properly set
Original file line number Diff line number Diff line change 1
1
---
2
2
name : tests
3
3
4
- on :
5
- push :
6
- branches-ignore :
7
- - ' development/**'
4
+ on : push
8
5
9
6
permissions :
10
7
packages : write
27
24
run : yarn lint_md
28
25
- name : lint javascript
29
26
run : yarn lint
30
- - name : Set development version
31
- run : yarn version --no-git-tag-version --new-version "0.0.0-sha.${{ github.sha }}"
27
+ - name : Set common env vars for npm publish
28
+ run : |
29
+ echo "SHORTSHA=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_ENV
30
+ echo "PKG_VERSION=$(yarn -s run get-version)" >> $GITHUB_ENV
31
+ - name : Set version for work in progress
32
+ run : yarn version --no-git-tag-version --new-version "0.0.0-sha.${SHORTSHA}"
33
+ if : !github.ref_protected
34
+ - name : Set version for protected branch
35
+ run : yarn version --no-git-tag-version --new-version "${PKG_VERSION}-sha.${SHORTSHA}"
36
+ if : github.ref_protected
32
37
- name : Publish development version
33
- run : npm publish --provenance
38
+ run : npm publish --provenance --tag "${{ github.ref_name }}"
34
39
env :
35
40
NODE_AUTH_TOKEN : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments