Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[draft] Use a separate version in nightly build mode #1481

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/publish-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
description: 'Identify the release as a prerelease (default: false)'
type: string
default: false
build_type:
description: 'Build type (default: nightly)'
type: string
default: nightly
outputs:
package_name:
description: 'Package name'
Expand All @@ -28,14 +32,21 @@ jobs:
- name: Install vsce tool
run: |
npm install -g vsce
- name: Set package version (nightly build)
id: set_package_version
if: ${{ inputs.build_type == 'nightly' }}
run: |
VER=$(npm version --no-git-tag-version --no-commit-hooks minor | cut -c2-)
option="--no-git-tag-version ${VER}-$(git rev-parse --short HEAD)"
echo "option=${option}" >> $GITHUB_OUTPUT
- name: Create vsix package (pre-release)
if: ${{ inputs.prerelease == 'true' }}
run: |
vsce package --pre-release
vsce package --pre-release ${{ steps.set_package_version.outputs.option }}
- name: Create vsix package
if: ${{ inputs.prerelease == 'false' }}
run: |
vsce package
vsce package ${{ steps.set_package_version.outputs.option }}
- id: search_package
run: |
fname=$(find . -name "*.vsix" | xargs -I {} basename {})
Expand Down