ci: use github

This commit is contained in:
Baptiste Augrain 2025-01-21 17:12:46 +01:00
parent 960cc3ebf4
commit 4bd16b0fae
No known key found for this signature in database
GPG Key ID: D0F9263E966FE50B
5 changed files with 6069 additions and 95 deletions

28
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Publish Package
on:
workflow_dispatch:
push:
tags:
- "*"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
- name: Setup Python 3
uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: npm ci
env:
npm_config_disturl: https://electronjs.org/headers
npm_config_target: 32.1.2
npm_config_runtime: electron
npm_config_build_from_source: true
- run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

8
.release-it.yml Normal file
View File

@ -0,0 +1,8 @@
git:
commitMessage: v${version}
tagName: v${version}
tagAnnotation: Release version ${version}
requireCleanWorkingDir: false
npm:
publish: false
disable-metrics: true

View File

@ -1,95 +0,0 @@
trigger:
branches:
include:
- main
pr: [main]
resources:
repositories:
- repository: templates
type: github
name: microsoft/vscode-engineering
ref: main
endpoint: Monaco
parameters:
- name: publishPackage
displayName: 🚀 Publish
type: boolean
default: false
extends:
template: azure-pipelines/npm-package/pipeline.yml@templates
parameters:
npmPackages:
- name: vscode-policy-watcher
buildSteps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
- script: |
set -e
includes=$(cat << 'EOF'
{
"target_defaults": {
"conditions": [
["OS=='linux'", {
'cflags_cc!': [ '-std=gnu++20' ],
'cflags_cc': [ '-std=gnu++2a' ],
}]
]
}
}
EOF
)
if [ ! -d "$HOME/.gyp" ]; then
mkdir -p "$HOME/.gyp"
fi
echo "$includes" > "$HOME/.gyp/include.gypi"
displayName: Override gnu target for older sysroot
condition: eq(variables['Agent.OS'], 'Linux')
- script: npm ci
testPlatforms:
- name: Linux
nodeVersions: [20.16.x]
- name: MacOS
nodeVersions: [20.16.x]
- name: Windows
nodeVersions: [20.16.x]
testSteps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11'
- script: |
set -e
includes=$(cat << 'EOF'
{
"target_defaults": {
"conditions": [
["OS=='linux'", {
'cflags_cc!': [ '-std=gnu++20' ],
'cflags_cc': [ '-std=gnu++2a' ],
}]
]
}
}
EOF
)
if [ ! -d "$HOME/.gyp" ]; then
mkdir -p "$HOME/.gyp"
fi
echo "$includes" > "$HOME/.gyp/include.gypi"
displayName: Override gnu target for older sysroot
condition: eq(variables['Agent.OS'], 'Linux')
- script: npm ci
env:
npm_config_disturl: https://electronjs.org/headers
npm_config_target: 32.1.2
npm_config_runtime: electron
npm_config_build_from_source: true
apiScanSoftwareName: 'vscode-policy-watcher'
apiScanSoftwareVersion: '1.1'
publishPackage: ${{ parameters.publishPackage }}

6027
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -18,5 +18,11 @@
"branches": [
"main"
]
},
"devDependencies": {
"release-it": "^18.1.1"
},
"scripts": {
"release": "release-it --no-increment"
}
}