-
-
Notifications
You must be signed in to change notification settings - Fork 14
71 lines (62 loc) · 1.88 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
on:
pull_request:
branches:
- main
push:
branches:
- main
name: 👷♂️ Build Visual Studio Code Extension
jobs:
build:
name: 👷♂️ Build
defaults:
run:
shell: pwsh
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
runs-on: ubuntu-20.04
steps:
- name: 🚚 Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 📥 Cache
id: cache
uses: actions/cache@v4
with:
path: |
node_modules
.vscode-test
key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }}
- name: ➕ Dependencies
uses: pnpm/[email protected]
with:
run_install: true
- name: 🔍 Get Calendar Version
id: version
run: |
git config --global --add safe.directory $PWD
dir env:
[string]$version = & .github\Get-CalendarVersion.ps1 -MergeBuild
"Calculated Version: $version"
"version=$version" >> $ENV:GITHUB_OUTPUT
"calendarVersion=$version" >> $ENV:GITHUB_OUTPUT
"semanticVersion=$version" >> $ENV:GITHUB_OUTPUT
- name: 👷♂️ Build and Package
run: |
pnpm package ${{steps.version.outputs.version}}
- name: ⬆ Artifact
uses: actions/upload-artifact@v4
with:
name: Pester Tests VSCode Extension
path: '*.vsix'
- name: 📝 Draft Github Release
if: github.ref == 'refs/heads/main' || github.head_ref == 'ci'
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
version: '${{steps.version.outputs.version}}'
prerelease: true
tag: 'v${{steps.version.outputs.version}}'