Skip to content

Commit

Permalink
Add canary release process (#37)
Browse files Browse the repository at this point in the history
* Create pre-release.yml

* Rename release workflow

* Create .node-version

* Disable on push

* Update pre-release.yml
  • Loading branch information
codybrouwers authored Sep 16, 2024
1 parent 7e0ac7d commit 654b373
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 6 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "Build and Publish Vercel Deployment Extension"

on:
workflow_dispatch:

jobs:
build-and-publish:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8.3.1
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Set to preview version
run: |
jq '. += { "id": "vercel-deployment-extension-preview", "name": "Vercel Deployment Extension (Preview)", "public": false, "galleryFlags": ["Preview"] }' vss-extension.json > temp.json \
&& mv temp.json vss-extension.json \
&& pnpm exec prettier --write vss-extension.json
echo "Updated vss-extension.json"
- name: Build and Publish
run: pnpm -C scripts build-and-publish
env:
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
9 changes: 3 additions & 6 deletions .github/workflows/ci.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@ name: "Build and Publish Vercel Deployment Extension"

on:
workflow_dispatch:
push:
branches:
- main

jobs:
build-and-publish:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3

- name: Install Node.js 16
uses: actions/setup-node@v3
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version-file: '.node-version'

- uses: pnpm/action-setup@v2
name: Install pnpm
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16

0 comments on commit 654b373

Please sign in to comment.