Skip to content

Commit fdea188

Browse files
committed
chore: env vars
1 parent 0cef785 commit fdea188

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/publish.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,20 @@ jobs:
4646
git push origin main
4747
continue-on-error: true
4848

49-
- name: Package VSCode Ext
50-
run: vsce package
49+
- id: package
50+
name: Package VSCode Ext
51+
run: |
52+
vsce package
53+
VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')
54+
echo "ext=syntax-mcfunction-$VERSION.vsix" >> "$GITHUB_OUTPUT"
5155
5256
- name: Archive production artifacts
5357
uses: actions/upload-artifact@v3
5458
if: "!startsWith(github.ref, 'refs/tags/')"
5559
with:
5660
name: dist-without-markdown
5761
path: |
58-
"*.vsix"
62+
"${{ steps.package.outputs.ext }}"
5963
"mcfunction.tmLanguage.yaml"
6064
"mcfunction.tmLanguage.json"
6165
@@ -70,6 +74,4 @@ jobs:
7074
7175
- name: Release to openvsix
7276
if: startsWith(github.ref, 'refs/tags/')
73-
run: |
74-
VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')
75-
npx ovsx publish syntax-mcfunction-$VERSION.vsix -p ${{ secrets.OVSX }}
77+
run: npx ovsx publish ${{ steps.package.outputs.ext }} -p ${{ secrets.OVSX }}

0 commit comments

Comments
 (0)