Skip to content

Commit

Permalink
chore: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RitikShah committed Jun 27, 2024
1 parent 7a4cf8a commit 02840f0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ jobs:

- id: version
name: Version
run: version=$(echo ${{ github.ref_name }} | sed 's/^v//') >> "$GITHUB_OUTPUT"
run: |
VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')
echo "v=$VERSION" >> "$GITHUB_OUTPUT"
echo "ext=syntax-mcfunction-$VERSION.vsix" >> "$GITHUB_OUTPUT"
- name: Push JSON to repo for sublime (if not matched)
if: github.ref == 'refs/heads/main'
Expand All @@ -53,7 +56,7 @@ jobs:
- name: Push version number to repo
if: startsWith(github.ref, 'refs/tags/')
run: |
jq '.version = ${{ steps.version.outputs.version }}' package.json > package.json
jq '.version = ${{ steps.version.outputs.v }}' package.json > package.json
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
git add mcfunction.tmLanguage.json
Expand All @@ -62,17 +65,15 @@ jobs:
- id: package
name: Package VSCode Ext
run: |
vsce package
echo "ext=syntax-mcfunction-$VERSION.vsix" >> "$GITHUB_OUTPUT"
run: vsce package

- name: Archive production artifacts
uses: actions/upload-artifact@v3
if: "!startsWith(github.ref, 'refs/tags/')"
with:
name: dist-without-markdown
path: |
"${{ steps.package.outputs.ext }}"
"${{ steps.version.outputs.ext }}"
"mcfunction.tmLanguage.yaml"
"mcfunction.tmLanguage.json"
Expand All @@ -87,4 +88,4 @@ jobs:
- name: Release to openvsix
if: startsWith(github.ref, 'refs/tags/')
run: npx ovsx publish ${{ steps.package.outputs.ext }} -p ${{ secrets.OVSX }}
run: npx ovsx publish ${{ steps.version.outputs.ext }} -p ${{ secrets.OVSX }}

0 comments on commit 02840f0

Please sign in to comment.