Skip to content

Commit 02840f0

Browse files
committed
chore: fix
1 parent 7a4cf8a commit 02840f0

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/publish.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ jobs:
3838

3939
- id: version
4040
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"
4245
4346
- name: Push JSON to repo for sublime (if not matched)
4447
if: github.ref == 'refs/heads/main'
@@ -53,7 +56,7 @@ jobs:
5356
- name: Push version number to repo
5457
if: startsWith(github.ref, 'refs/tags/')
5558
run: |
56-
jq '.version = ${{ steps.version.outputs.version }}' package.json > package.json
59+
jq '.version = ${{ steps.version.outputs.v }}' package.json > package.json
5760
git config --global user.name "github-actions"
5861
git config --global user.email "[email protected]"
5962
git add mcfunction.tmLanguage.json
@@ -62,17 +65,15 @@ jobs:
6265
6366
- id: package
6467
name: Package VSCode Ext
65-
run: |
66-
vsce package
67-
echo "ext=syntax-mcfunction-$VERSION.vsix" >> "$GITHUB_OUTPUT"
68+
run: vsce package
6869

6970
- name: Archive production artifacts
7071
uses: actions/upload-artifact@v3
7172
if: "!startsWith(github.ref, 'refs/tags/')"
7273
with:
7374
name: dist-without-markdown
7475
path: |
75-
"${{ steps.package.outputs.ext }}"
76+
"${{ steps.version.outputs.ext }}"
7677
"mcfunction.tmLanguage.yaml"
7778
"mcfunction.tmLanguage.json"
7879
@@ -87,4 +88,4 @@ jobs:
8788
8889
- name: Release to openvsix
8990
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

Comments
 (0)