feat: 改成 docker action
This commit is contained in:
25
action.yaml
25
action.yaml
@@ -13,26 +13,5 @@ inputs:
|
||||
index:
|
||||
default: 0
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- run: |
|
||||
HEADER="Authorization: token ${{ inputs.token }}"
|
||||
SOURCE="${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/tags/v${{ inputs.version }}"
|
||||
echo "HEADER: $HEADER"
|
||||
echo "SOURCE: $SOURCE"
|
||||
|
||||
RELEASE_JSON="$(curl -s -H "$HEADER" "$SOURCE")"
|
||||
DOWNLOAD_NAME="$(echo "$RELEASE_JSON" | jq -r ".assets[${{ inputs.index }}].name")"
|
||||
DOWNLOAD_URL="$(echo "$RELEASE_JSON" | jq -r ".assets[${{ inputs.index }}].browser_download_url")"
|
||||
|
||||
echo "DOWNLOAD_NAME: $DOWNLOAD_NAME"
|
||||
echo "DOWNLOAD_URL: $DOWNLOAD_URL"
|
||||
|
||||
echo "ARTIFACT DOWNLOADING..."
|
||||
curl -s -H "$HEADER" "$DOWNLOAD_URL" -o "$DOWNLOAD_NAME"
|
||||
|
||||
echo "ARTIFACT UNZIPPING..."
|
||||
unzip "$DOWNLOAD_NAME" -d output
|
||||
|
||||
echo "ARTIFACT PUSHING..."
|
||||
dotnet nuget push "output/*.nupkg" --source "${{ inputs.source }}" --api-key "${{ inputs.api_key }}" --skip-duplicate --allow-insecure-connections
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
|
||||
Reference in New Issue
Block a user