Compare commits

..

8 Commits

Author SHA1 Message Date
5489463885 up
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-13 00:41:16 +02:00
cf1eca0e5c up
Some checks failed
continuous-integration/drone/tag Build is failing
2024-08-13 00:33:07 +02:00
5a28602203 up
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-13 00:06:19 +02:00
9b3cd8cbcc feature: wedoxa 2024-08-13 00:03:54 +02:00
b7608be252 up
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-13 00:02:23 +02:00
4235fd7961 up
Some checks reported errors
continuous-integration/drone/tag Build was killed
2024-08-12 23:51:11 +02:00
2f359da27a up
All checks were successful
continuous-integration/drone/tag Build is passing
2024-08-12 23:10:32 +02:00
8340c1b4f2 up
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/tag Build encountered an error
2024-08-12 23:08:18 +02:00
4 changed files with 53 additions and 15 deletions

View File

@ -1,33 +1,32 @@
kind: pipeline
type: ssh
name: default
server:
host: build.gextra.net
user: root
ssh_key:
from_secret: ssh_key_secret
trigger:
event:
- tag
steps:
- name: build
environment:
PASSWORD:
from_secret: password
image: node
commands:
- npm install -g vsce
- npm ci
- vsce package
# - name: gitea_release
# environment:
# GITEA_TOKEN:
# from_secret: gitea_token
# commands:
# - bash gitearelease.sh
- name: gitea_release
image: plugins/gitea-release
settings:
base_url: https://gitea.raphaelpiccolo.com
files: ./*.vsix
api_key:
from_secret: gitea_token
base_url: https://gitea.raphaelpiccolo.com
files: *.vsix
# - name: deploy
# environment:

39
gitearelease.sh Normal file
View File

@ -0,0 +1,39 @@
#!/bin/bash
# Variables
# GITEA_TOKEN="xxxxxxxxxx"
# DRONE_TAG="1.1.6"
# DRONE_REPO_NAME="vscodestat"
# DRONE_REPO_OWNER="root"
GITEA_API_URL="https://gitea.raphaelpiccolo.com/api/v1"
RELEASE_NAME="Release ${DRONE_TAG}"
RELEASE_BODY="vscode extension generated"
ARTIFACT_PATH="${DRONE_REPO_NAME}-${DRONE_TAG}.vsix"
# Create a release
response=$(curl -s -X POST "${GITEA_API_URL}/repos/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}/releases" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{
\"tag_name\": \"${DRONE_TAG}\",
\"name\": \"${RELEASE_NAME}\",
\"body\": \"${RELEASE_BODY}\",
\"draft\": false,
\"prerelease\": false
}")
# Extract release ID from the response
release_id=$(echo $response | jq '.id')
if [ -z "$release_id" ]; then
echo "Failed to create release"
exit 1
fi
# Upload the artifact
curl -s -X POST "${GITEA_API_URL}/repos/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}/releases/${release_id}/assets?name=$(basename ${ARTIFACT_PATH})" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: $(file -b --mime-type ${ARTIFACT_PATH})" \
--data-binary @"${ARTIFACT_PATH}"
echo "Artifact uploaded successfully."

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "vscodestat",
"version": "1.1.4",
"version": "1.1.11",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "vscodestat",
"version": "1.1.4",
"version": "1.1.11",
"license": "ISC",
"devDependencies": {
"@types/mocha": "^10.0.7",

View File

@ -1,7 +1,7 @@
{
"name": "vscodestat",
"displayName": "vscodestat",
"version": "1.1.4",
"version": "1.1.11",
"description": "",
"categories": [
"Other"