File tree 2 files changed +15
-2
lines changed
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 36
36
- name : Export JSON from YAML
37
37
run : js-yaml mcfunction.tmLanguage.yaml > mcfunction.tmLanguage.json
38
38
39
+ - id : version
40
+ name : Version
41
+ run : version=$(echo ${{ github.ref_name }} | sed 's/^v//') >> "$GITHUB_OUTPUT"
42
+
39
43
- name : Push JSON to repo for sublime (if not matched)
40
44
if : github.ref == 'refs/heads/main'
41
45
run : |
@@ -46,11 +50,20 @@ jobs:
46
50
git push origin main
47
51
continue-on-error : true
48
52
53
+ - name : Push version number to repo
54
+ if : startsWith(github.ref, 'refs/tags/')
55
+ run : |
56
+ jq '.version = ${{ steps.version.outputs.version }}' package.json > package.json
57
+ git config --global user.name "github-actions"
58
+ git config --global user.email "[email protected] "
59
+ git add mcfunction.tmLanguage.json
60
+ git commit -m "🤖 Bump version"
61
+ git push origin main
62
+
49
63
- id : package
50
64
name : Package VSCode Ext
51
65
run : |
52
66
vsce package
53
- VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')
54
67
echo "ext=syntax-mcfunction-$VERSION.vsix" >> "$GITHUB_OUTPUT"
55
68
56
69
- name : Archive production artifacts
Original file line number Diff line number Diff line change 43
43
"devDependencies" : {
44
44
"js-yaml" : " ^4.1.0"
45
45
}
46
- }
46
+ }
You can’t perform that action at this time.
0 commit comments