File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 3636 - name : Export JSON from YAML
3737 run : js-yaml mcfunction.tmLanguage.yaml > mcfunction.tmLanguage.json
3838
39+ - id : version
40+ name : Version
41+ run : version=$(echo ${{ github.ref_name }} | sed 's/^v//') >> "$GITHUB_OUTPUT"
42+
3943 - name : Push JSON to repo for sublime (if not matched)
4044 if : github.ref == 'refs/heads/main'
4145 run : |
@@ -46,11 +50,20 @@ jobs:
4650 git push origin main
4751 continue-on-error : true
4852
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 "action@github.com"
59+ git add mcfunction.tmLanguage.json
60+ git commit -m "🤖 Bump version"
61+ git push origin main
62+
4963 - id : package
5064 name : Package VSCode Ext
5165 run : |
5266 vsce package
53- VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')
5467 echo "ext=syntax-mcfunction-$VERSION.vsix" >> "$GITHUB_OUTPUT"
5568
5669 - name : Archive production artifacts
Original file line number Diff line number Diff line change 4343 "devDependencies" : {
4444 "js-yaml" : " ^4.1.0"
4545 }
46- }
46+ }
You can’t perform that action at this time.
0 commit comments