From e1d40a80581c9628033e7a8d240c0d5ec29ad42a Mon Sep 17 00:00:00 2001 From: shawnfunke Date: Thu, 22 Jun 2023 07:31:50 +0200 Subject: [PATCH] [ci] publish extension to marketplace for releases (#21) Resolves #14 --- .github/workflows/release.yaml | 6 ++++++ azure-devops-extension.json | 2 +- package.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e5f140c..c8bae75 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -65,5 +65,11 @@ jobs: - name: Package Extension run: npm run package-extension + - name: Publish Extension + run: npm run publish-extension + env: + AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT }} + if: github.event_name == 'push' + - name: Publish Release run: gh release create $TAG_VERSION $PRERELEASE --title $TAG_VERSION --generate-notes --target $GITHUB_SHA *.vsix diff --git a/azure-devops-extension.json b/azure-devops-extension.json index 1c4332f..4963a49 100644 --- a/azure-devops-extension.json +++ b/azure-devops-extension.json @@ -6,7 +6,7 @@ "name": "Attachment Previewer", "description": "Provides attachment previews for all kinds of files.", - "public": false, + "public": true, "version": "0.0.0", diff --git a/package.json b/package.json index 0aab9fb..fd31f05 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "build:dev": "npm run compile:dev && npm run postbuild", "postbuild": "npm run package-extension -- --rev-version", "package-extension": "tfx extension create --manifest-globs azure-devops-extension.json src/Modules/**/*.json", - "publish-extension": "tfx extension publish --manifest-globs azure-devops-extension.json src/Modules/**/*.json", + "publish-extension": "tfx extension publish --token $AZURE_DEVOPS_PAT --manifest-globs azure-devops-extension.json src/Modules/**/*.json", "test": "cross-env TEST_REPORT_FILENAME=test-results.xml jest --verbose" },