mirror of
https://github.com/VSCodium/policy-watcher.git
synced 2025-12-10 03:53:55 -06:00
ci: use github
This commit is contained in:
parent
960cc3ebf4
commit
4bd16b0fae
28
.github/workflows/publish.yml
vendored
Normal file
28
.github/workflows/publish.yml
vendored
Normal 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
8
.release-it.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
git:
|
||||||
|
commitMessage: v${version}
|
||||||
|
tagName: v${version}
|
||||||
|
tagAnnotation: Release version ${version}
|
||||||
|
requireCleanWorkingDir: false
|
||||||
|
npm:
|
||||||
|
publish: false
|
||||||
|
disable-metrics: true
|
||||||
@ -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
6027
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -18,5 +18,11 @@
|
|||||||
"branches": [
|
"branches": [
|
||||||
"main"
|
"main"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"release-it": "^18.1.1"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"release": "release-it --no-increment"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user