- Add logs to upload-artifact
This commit is contained in:
10
.github/actions/upload-artifact/action.yml
vendored
10
.github/actions/upload-artifact/action.yml
vendored
@@ -31,17 +31,21 @@ runs:
|
|||||||
|
|
||||||
client = Client(
|
client = Client(
|
||||||
"http://mc.yuhao7370.top:5212/dav",
|
"http://mc.yuhao7370.top:5212/dav",
|
||||||
auth=("${{ inputs.WEBDAV_USERNAME }}", "${{ inputs.WEBDAV_PASSWORD }}")
|
auth=("${{ inputs.WEBDAV_USERNAME }}", "${{ inputs.WEBDAV_PASSWORD }}"),
|
||||||
|
timeout=None,
|
||||||
)
|
)
|
||||||
if '${{ inputs.ARTIFACT_TYPE }}' == 'release':
|
if '${{ inputs.ARTIFACT_TYPE }}' == 'release'
|
||||||
|
print('Removing previous ${{ inputs.ARTIFACT_PLATFORM }} release file...')
|
||||||
for file in client.ls('Techmino distribution'):
|
for file in client.ls('Techmino distribution'):
|
||||||
if re.search(r'(Techmino_a[0-9]+\.[0-9]+\.[0-9]_${{ inputs.ARTIFACT_PLATFORM }}.*)', file['name']):
|
if re.search(r'(Techmino_a[0-9]+\.[0-9]+\.[0-9]_${{ inputs.ARTIFACT_PLATFORM }}.*)', file['name']):
|
||||||
client.remove(file['name'])
|
client.remove(file['name'])
|
||||||
|
print('Uploading new ${{ inputs.ARTIFACT_PLATFORM }} release file...')
|
||||||
client.upload_file("${{ inputs.ARTIFACT_NAME }}", 'Techmino distribution/${{ inputs.ARTIFACT_NAME }}')
|
client.upload_file("${{ inputs.ARTIFACT_NAME }}", 'Techmino distribution/${{ inputs.ARTIFACT_NAME }}')
|
||||||
|
|
||||||
if '${{ inputs.ARTIFACT_TYPE }}' == 'test':
|
if '${{ inputs.ARTIFACT_TYPE }}' == 'test':
|
||||||
|
print('Removing previous ${{ inputs.ARTIFACT_PLATFORM }} test file...')
|
||||||
for file in client.ls('Techmino Snapshot'):
|
for file in client.ls('Techmino Snapshot'):
|
||||||
if re.search(r'(Techmino_pre[0-9]+\.[0-9]+\.[0-9]_[0-9a-z]{7}_${{ inputs.ARTIFACT_PLATFORM }}.*)', file['name']):
|
if re.search(r'(Techmino_pre[0-9]+\.[0-9]+\.[0-9]_[0-9a-z]{7}_${{ inputs.ARTIFACT_PLATFORM }}.*)', file['name']):
|
||||||
client.remove(file['name'])
|
client.remove(file['name'])
|
||||||
|
print('Uploading new ${{ inputs.ARTIFACT_PLATFORM }} test file...')
|
||||||
client.upload_file("${{ inputs.ARTIFACT_NAME }}", 'Techmino Snapshot/${{ inputs.ARTIFACT_NAME }}')
|
client.upload_file("${{ inputs.ARTIFACT_NAME }}", 'Techmino Snapshot/${{ inputs.ARTIFACT_NAME }}')
|
||||||
|
|
||||||
|
|||||||
20
.github/workflows/test.yml
vendored
20
.github/workflows/test.yml
vendored
@@ -51,17 +51,17 @@ jobs:
|
|||||||
path: love
|
path: love
|
||||||
- name: Pack Techmino
|
- name: Pack Techmino
|
||||||
run: 7z a -tzip .\Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Windows.zip .\love
|
run: 7z a -tzip .\Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Windows.zip .\love
|
||||||
# - name: Upload artifact to server
|
|
||||||
# uses: ./.github/actions/upload-artifact
|
|
||||||
# with:
|
|
||||||
# WEBDAV_USERNAME: ${{ secrets.WEBDAV_USERNAME }}
|
|
||||||
# WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }}
|
|
||||||
# ARTIFACT_TYPE: test
|
|
||||||
# ARTIFACT_PLATFORM: Windows
|
|
||||||
# ARTIFACT_NAME: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Windows.zip
|
|
||||||
- name: Upload artifact to server
|
- name: Upload artifact to server
|
||||||
run: |
|
uses: ./.github/actions/upload-artifact
|
||||||
curl --user "${{ secrets.WEBDAV_USERNAME }}:${{ secrets.WEBDAV_PASSWORD }}" -T Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Windows.zip http://mc.yuhao7370.top:5212/dav/Techmino%20Snapshots/ -v
|
with:
|
||||||
|
WEBDAV_USERNAME: ${{ secrets.WEBDAV_USERNAME }}
|
||||||
|
WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }}
|
||||||
|
ARTIFACT_TYPE: test
|
||||||
|
ARTIFACT_PLATFORM: Windows
|
||||||
|
ARTIFACT_NAME: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Windows.zip
|
||||||
|
# - name: Upload artifact to server
|
||||||
|
# run: |
|
||||||
|
# curl --user "${{ secrets.WEBDAV_USERNAME }}:${{ secrets.WEBDAV_PASSWORD }}" -T Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Windows.zip http://mc.yuhao7370.top:5212/dav/Techmino%20Snapshots/ -v
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|||||||
Reference in New Issue
Block a user