Skip to content

ci: preview prerelease publish on main merges (#97) #566

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
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
31 changes: 31 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,34 @@ jobs:
- run: yarn

- run: yarn test:ci

preview:
name: preview prerelease (marketplace)
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && secrets.VSCE_PAT != '' }}
runs-on: ubuntu-22.04
needs: [lint, test]
concurrency:
group: preview-marketplace
cancel-in-progress: true
permissions:
contents: read
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: "22"

- run: yarn

- name: Compute prerelease version
id: version
run: |
BASE_VERSION=$(node -p "require('./package.json').version")
SHORT_SHA=${GITHUB_SHA::7}
echo "value=${BASE_VERSION}-pre.${GITHUB_RUN_NUMBER}.${SHORT_SHA}" >> $GITHUB_OUTPUT

- name: Publish prerelease to VS Code Marketplace
run: yarn vsce publish --pre-release ${{ steps.version.outputs.value }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- run: yarn

- run: npx vsce package
- run: yarn vsce package

- uses: "marvinpinto/action-automatic-releases@latest"
with:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lint": "eslint . --ext ts,md,json",
"lint:fix": "yarn lint --fix",
"package": "webpack --mode production --devtool hidden-source-map",
"package:prerelease": "npx vsce package --pre-release",
"package:prerelease": "yarn vsce package --pre-release",
"pretest": "tsc -p . --outDir out && yarn run build && yarn run lint",
"test": "vitest",
"test:ci": "CI=true yarn test",
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy