38
38
39
39
- id : version
40
40
name : Version
41
- run : version=$(echo ${{ github.ref_name }} | sed 's/^v//') >> "$GITHUB_OUTPUT"
41
+ run : |
42
+ VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')
43
+ echo "v=$VERSION" >> "$GITHUB_OUTPUT"
44
+ echo "ext=syntax-mcfunction-$VERSION.vsix" >> "$GITHUB_OUTPUT"
42
45
43
46
- name : Push JSON to repo for sublime (if not matched)
44
47
if : github.ref == 'refs/heads/main'
53
56
- name : Push version number to repo
54
57
if : startsWith(github.ref, 'refs/tags/')
55
58
run : |
56
- jq '.version = ${{ steps.version.outputs.version }}' package.json > package.json
59
+ jq '.version = ${{ steps.version.outputs.v }}' package.json > package.json
57
60
git config --global user.name "github-actions"
58
61
git config --global user.email "[email protected] "
59
62
git add mcfunction.tmLanguage.json
@@ -62,17 +65,15 @@ jobs:
62
65
63
66
- id : package
64
67
name : Package VSCode Ext
65
- run : |
66
- vsce package
67
- echo "ext=syntax-mcfunction-$VERSION.vsix" >> "$GITHUB_OUTPUT"
68
+ run : vsce package
68
69
69
70
- name : Archive production artifacts
70
71
uses : actions/upload-artifact@v3
71
72
if : " !startsWith(github.ref, 'refs/tags/')"
72
73
with :
73
74
name : dist-without-markdown
74
75
path : |
75
- "${{ steps.package .outputs.ext }}"
76
+ "${{ steps.version .outputs.ext }}"
76
77
"mcfunction.tmLanguage.yaml"
77
78
"mcfunction.tmLanguage.json"
78
79
87
88
88
89
- name : Release to openvsix
89
90
if : startsWith(github.ref, 'refs/tags/')
90
- run : npx ovsx publish ${{ steps.package .outputs.ext }} -p ${{ secrets.OVSX }}
91
+ run : npx ovsx publish ${{ steps.version .outputs.ext }} -p ${{ secrets.OVSX }}
0 commit comments