Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
fix: add new tasks to publish
Browse files Browse the repository at this point in the history
The CI task needs to force these flags to ensure the builds are going to
 be correctly configured for the marketplace.
  • Loading branch information
michaeljohnbennett committed Jul 20, 2022
1 parent 39879a8 commit d48cb9c
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,6 @@ jobs:
= /version => "${{ steps.gitversion.outputs.majorMinorPatch }}"
= /aiKey => "${{ secrets.AIKEY }}"
# - name: add version in CHANGELOG.md
# uses: cschleiden/[email protected]
# with:
# files: '${{github.workspace}}/CHANGELOG.md'
# env:
# VERSION: '${{ steps.gitversion.outputs.majorMinorPatch }}'

- name: set vsix path
run: |
echo "vsix_path=${{steps.packageJson.outputs.packageName}}-${{steps.gitversion.outputs.majorMinorPatch}}" | Out-File -FilePath $env:GITHUB_ENV -Append
Expand All @@ -89,13 +82,29 @@ jobs:
echo "VSCE_FLAGS=--pre-release --yarn " | Out-File -FilePath $env:GITHUB_ENV -Append
echo "flags_set=true" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: package - pre-release - package.json - set preRelease flag to true
if: ${{ inputs.releaseType == 'pre-release' }}
uses: onlyutkarsh/[email protected]
with:
files: '${{github.workspace}}/package.json'
patch-syntax: |
= /__metadata/isPreReleaseVersion => "true"
- name: package - pre-release
if: ${{ inputs.releaseType == 'pre-release' }}
run: |
echo ":: Packaging VSIX VSCE_FLAGS=${{ env.VSCE_FLAGS }}, ${{ env.flags_set }}::"
yarn package ${{ env.VSCE_FLAGS }}
echo "vsix_type=-PRE_RELEASE" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: package - release - package.json - set preRelease flag to false
if: ${{ inputs.releaseType == 'release' }}
uses: onlyutkarsh/[email protected]
with:
files: '${{github.workspace}}/package.json'
patch-syntax: |
= /__metadata/isPreReleaseVersion => "false"
- name: package - release
if: ${{ inputs.releaseType == 'release' }}
run: |
Expand All @@ -112,16 +121,6 @@ jobs:
with:
path: ${{ github.workspace }}/${{ env.vsix_path }}.vsix
name: ${{ env.vsix_path }}${{ env.vsix_type }}.vsix

# - name: publish to marketplace
# if: github.ref == 'refs/heads/master'
# run: npm run deploy ${{ env.PAT }}
# TODO: Look at a release plugin that could create and upload the VSIX for us to a release page.concurrency:
# - name: create a release
# # if: github.ref == 'refs/heads/master'
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
# with:
# tag_name: v${{ steps.gitversion.outputs.semVer }}
# release_name: v${{ steps.gitversion.outputs.semVer }}
# - name: publish to marketplace
# if: github.ref == 'refs/heads/master'
# run: npm run deploy ${{ env.PAT }}

0 comments on commit d48cb9c

Please sign in to comment.