Update file .gitlab-ci.yml
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
image: alpine:latest
|
||||
|
||||
variables:
|
||||
GITHUB_TOKEN: "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"
|
||||
GITLAB_TOKEN: "glpat-rW7VuSQ2zNno7y16UtpA"
|
||||
REPO_OWNER: "Souma-Sumire"
|
||||
REPO_NAME: "FFXIVChnTextPatch-Souma"
|
||||
|
||||
stages:
|
||||
- copy_release
|
||||
|
||||
copy_release:
|
||||
stage: copy_release
|
||||
script:
|
||||
- apk add curl jq
|
||||
- |
|
||||
# Get latest release information from GitHub
|
||||
RELEASE_INFO=$(curl -s -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases/latest")
|
||||
DOWNLOAD_URL=$(echo "$RELEASE_INFO" | jq -r '.assets[0].browser_download_url')
|
||||
FILENAME=$(echo "$RELEASE_INFO" | jq -r '.assets[0].name')
|
||||
# Download release asset
|
||||
curl -L -o "$FILENAME" "$DOWNLOAD_URL"
|
||||
# Upload release asset to GitLab
|
||||
curl --request POST --header "PRIVATE-TOKEN: $GITLAB_TOKEN" --form "file=@$FILENAME" "https://gitlab.example.com/api/v4/projects/<Your GitLab Project ID>/uploads"
|
||||
Reference in New Issue
Block a user