add publish step to gh actions

This commit is contained in:
2021-12-07 11:47:19 +03:00
parent 926b050a63
commit 3b1a55ea0a
3 changed files with 2226 additions and 70 deletions

View File

@@ -59,3 +59,38 @@ jobs:
with: with:
path: ${{ env.VSIX_PATH }} path: ${{ env.VSIX_PATH }}
name: ${{ env.VSIX_NAME }} name: ${{ env.VSIX_NAME }}
release:
runs-on: ubuntu-latest
needs: package
if: startsWith(github.ref, 'refs/tags/v')
name: Release
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14"
- run: npm install
- run: npm install -g vsce
- run: vsce package
- run: echo "VSIX_PATH=$(find . -maxdepth 1 -type f -iname "*.vsix" | head -1)" >> $GITHUB_ENV
- run: echo "VSIX_NAME=$(basename $(find . -maxdepth 1 -type f -iname "*.vsix" | head -1))" >> $GITHUB_ENV
- uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VSCE_PAT: ${{ secrets.VSCE_PAT }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: See [CHANGE LOG](https://github.com/maksim77/gitcheck/blob/main/CHANGELOG.md) for details.
draft: false
prerelease: false
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.VSIX_PATH }}
asset_name: ${{ env.VSIX_NAME }}
asset_content_type: application/zip
- run: vsce publish

2122
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,71 +1,72 @@
{ {
"name": "gitcheck", "name": "gitcheck",
"displayName": "Git User Check", "displayName": "Git User Check",
"description": "Checking the user's compliance with the repository", "description": "Checking the user's compliance with the repository",
"version": "0.0.2", "version": "0.0.2",
"preview": true, "preview": true,
"engines": { "engines": {
"vscode": "^1.62.0" "vscode": "^1.62.0"
}, },
"categories": [ "categories": [
"Other" "Other"
], ],
"author": { "author": {
"name": "Maksim Syomochkin", "name": "Maksim Syomochkin",
"email": "maksim77ster@gmail.com" "email": "maksim77ster@gmail.com"
}, },
"publisher": "mak-sim", "publisher": "mak-sim",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/maksim77/gitcheck.git" "url": "https://github.com/maksim77/gitcheck.git"
}, },
"activationEvents": [ "activationEvents": [
"workspaceContains:.git/" "workspaceContains:.git/"
], ],
"extensionDependencies": [ "extensionDependencies": [
"vscode.git" "vscode.git"
], ],
"main": "./out/extension.js", "main": "./out/extension.js",
"contributes": { "contributes": {
"configuration":[ "configuration": [
{ {
"title": "Git User Check", "title": "Git User Check",
"properties": { "properties": {
"gitcheck.domain": { "gitcheck.domain": {
"type": "string", "type": "string",
"description": "Remote domain for check" "description": "Remote domain for check"
}, },
"gitcheck.name": { "gitcheck.name": {
"type":"string", "type": "string",
"description": "user.name for gitcheck domain" "description": "user.name for gitcheck domain"
}, },
"gitcheck.email": { "gitcheck.email": {
"type":"string", "type": "string",
"description": "user.email for gitcheck domain" "description": "user.email for gitcheck domain"
} }
} }
} }
] ]
}, },
"scripts": { "scripts": {
"vscode:prepublish": "npm run compile", "vscode:prepublish": "npm run compile",
"compile": "tsc -p ./", "compile": "tsc -p ./",
"watch": "tsc -watch -p ./", "watch": "tsc -watch -p ./",
"pretest": "npm run compile && npm run lint", "pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts", "lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js" "test": "node ./out/test/runTest.js"
}, },
"devDependencies": { "devDependencies": {
"@types/vscode": "^1.62.0", "@types/glob": "^7.1.4",
"@types/glob": "^7.1.4", "@types/mocha": "^9.0.0",
"@types/mocha": "^9.0.0", "@types/node": "14.17.27",
"@types/node": "14.17.27", "@types/vscode": "^1.62.0",
"@typescript-eslint/eslint-plugin": "^5.1.0", "@typescript-eslint/eslint-plugin": "^5.1.0",
"@typescript-eslint/parser": "^5.1.0", "@typescript-eslint/parser": "^5.1.0",
"eslint": "^8.1.0", "@vscode/test-electron": "^1.6.2",
"glob": "^7.1.7", "eslint": "^8.1.0",
"mocha": "^9.1.3", "glob": "^7.1.7",
"typescript": "^4.4.4", "mocha": "^9.1.3",
"@vscode/test-electron": "^1.6.2" "typescript": "^4.4.4",
} "vsce": "^2.5.1"
}
} }